简体   繁体   English

从HTML模板使用BIRT生成HTML报告

[英]Generate an HTML report with BIRT from an HTML Template

In a project I'm working on, we're using BIRT to generate some HTML reports from some XML Traces. 在我正在从事的项目中,我们正在使用BIRT从一些XML跟踪生成一些HTML报告。

However these reports are pretty simple and ugly and we wish to improve them. 但是,这些报告非常简单且难看,我们希望对其进行改进。 We made a mockup/template in HTML/CSS (and some JavaScript that we want to be embedded in each reports) but now that we're happy with the design, there seem to be a problem (that we should have seen before): 我们在HTML / CSS中创建了一个模型/模板(以及一些我们希望嵌入到每个报告中的JavaScript),但是现在我们对设计感到满意,似乎出现了一个问题(之前我们应该已经看过):

Can we use this template with BIRT? 我们可以将此模板与BIRT一起使用吗? AFAIK, we have to design the birt template using birt's tools ; AFAIK,我们必须使用birt的工具设计birt模板; and it'll be a lot of (useless) work to do so, and we're not even sure we'll be able to obtain the same design with birt as we tweaked things very tightly with CSS. 而且这样做会耗费大量(无用的)工作,而且我们甚至不确定我们是否能够使用Birt获得相同的设计,因为我们使用CSS进行了非常紧密的调整。

You can give bookmarks to all of your visualizations in the BIRT report and then use the JavaScript API to display the content in your template. 您可以在BIRT报告中为所有可视化添加书签,然后使用JavaScript API在模板中显示内容。 Alternatively, if you are building even the visualization in the HTML template, you can use the REST API to extract data into JSON format and then visualize that as you like in your HTML pages. 另外,如果您甚至要在HTML模板中构建可视化,则可以使用REST API将数据提取为JSON格式,然后根据需要在HTML页面中可视化。

You could also load the external CSS file with the BIRT report. 您也可以使用BIRT报告加载外部CSS文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM