We already have a javaweb application, now we want to implement the integration of the report
This is what my app looks like.
Description
1) Here is the birt4.4 version of the, download Birt-runtime-4.4.zip (in the official download), and then Birt.war decompression, you can see logs report scriptlib webcontent web-inf **.jsp * *.rptdesign these files and folders
2) put the content under the Web_inf in the corresponding directory of our own WEB application Web-inf, and merge it with the XML content of our application, birt the specific configuration of the XML in the document
3) Birt WebContent directory must be placed in the root of the Web application, if you want to put it in the directory you specify, such as my own application inside the Birt directory, you need to modify the Birt jar of Viewsevlets.jar in the three classes: Org.eclipse.birt.report.servlet.ViewerServlet.java Org.eclipse.birt.report.servlet.BirtEngineServlet.java Org.eclipse.birt.report.taglib.ParamDefTag.java (need to use the Anti-compilation tool, I use jd-gui.exe here)
4) Design your own report or report template, put in the configuration file specified path, I am here in the Birt directory, such as the above eastcom_test_report.rpttemplate
5) Our own JSP page is directly redirected to the Birt engine for processing
<s:form id= "MYFORM"action= "/frameset" Method= "POST" theme= "simple" ><div id= "content" ><table><tr><th width= "13%" ><span> *</span> template name: </th><td width= "35%" ><div><s:textfield name= "ReportDesign.name" maxlength = "Readonly=" "true"/></div></td><th width= "17%" ><span>*</span> template route: </th ><TD width= "35%" ><div><s:textfield name= "reportdesign.designlocation" maxlength= "readonly=" True "/></div></td></tr><tr><th colspan=" 4 "style=" Text-align:center; " ><span> set the following report parameters </span></th></tr><tr><th colspan= "4" > </th ></tr><tr><th width= "13%" ><span>*</span> resources key:</th><td width= "35%" > <div><s:textfield name= "Resource_key" maxlength= "All" onblur= "check.required (This)"/><s:hidden name= "__report" value= "%{reportdesign.designlocation}" ></s:hidden>, which specifies the specific template name, It's going to match the path we put on the template or the report.</div></td></tr></table></div><div id= "operator" ><div class= "left" > </div><div class= "Middle" onclick= "Page.submit (True)" > Submit </div><div class= "right" ></div ><div class= "left" ></div><div class= "Middle" onclick= "Page.close ()" > Close </div><div Class= "Right" ></div></div></s:form>
6) If you are publishing to a WebSphere server, you need to include Itext.1.3.jar in Lib