Hi,
I am writing the following query in my .jrxml file(using the created db2 repository for db connectivity) and the report is generated successfully in jasper studio But i want to generate the same report from my jsp page and in the back end the values(table values) might change, so the report should be generated accordingly. What should the datasource be in such a case ?
In my departments.jrxml file
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="JasperDB"></property> <querystring></querystring> <!--[CDATA[SELECT DEPARTMENT.DEPARTMENT_NAME, DEPARTMENT.NO_OF_EMPLOYEES FROM EEMS.DEPARTMENT AS DEPARTMENT]]>
In action class:
try { JasperCompileManager.compileReportToFile( "D:/EmployeeExpense/eems/WebContent/users.jrxml", "D:/EmployeeExpense/eems/WebContent/users.jasper");
In struts.xml
<action class="com.eems.action.PieAction" name="pie"></action> <result name="success" type="jasper"></result> <param name="location">/jasper/departments.jasper</param> <param name="dataSource">JasperDB</param> //JasperDB is the name of the repository
Attachments:
0 Answers:
No answers yet