pnvswamy
-
Posts
38 -
Joined
-
Last visited
Content Type
Forum
Downloads
Featured Visualizations
Knowledge Base
Documentation (PDF Downloads)
Blog
Documentation (Test Area)
Documentation
Dr. Jaspersoft Webinar Series
Security Advisories
Events
Profiles
Posts posted by pnvswamy
-
-
hi,
I am having the field type ArrayList in employee Bean.
I want to show that list in Report.
Ex : i am setting the projectDetails as a ArrayList in Bean.
And i configured the <field name="projectDetails" class="java.util.ArrayList"/>
then i am getting the exception like --->
Could you please help me how to represent arraylist type Data in .jrxml file.
Error retrieving field value from bean : projectDetails
-
the generateReport() method looks like this{
PaReportsHelper reportsHelper =
new PaReportsHelper();"reports/Employee_subreport1.jrxml");"reports/Employee_subreport1.jasper");out.println("List Size:"+employeeList.size());if(employeeList.size() == 0 ){new ActionMessage("PA.PaEmpReportsByStatusAction.generateReport.noData");"noData", noData);return mapping.findForward("noRecords");try{
// JasperCompileManager.compileReportToFile(getServlet().getServletContext().getRealPath("reports/PaEmployeeDetailReport.jrxml"), getServlet().getServletContext().getRealPath("reports/PaEmployeeDetailReport.jasper"));
JasperDesign jasperDesign1 = JRXmlLoader.load(subFileSrc);
JasperReport jasperReport1 = JasperCompileManager.compileReport(jasperDesign1);
JasperCompileManager.compileReportToFile(subFileSrc,subFileDest );
List projects = reportsHelper.employeeProjectDetails(
File fileSrc =
File destFile =
JasperDesign jasperDesign = JRXmlLoader.load(fileSrc);
JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
java.util.Map parameters =
parameters.put(
parameters.put(
JRBeanCollectionDataSource ds =
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, ds );
new Integer(5));new File(getServlet().getServletContext().getRealPath("reports/PaEmployeeDetailReport.jrxml"));null; new java.util.HashMap();"subReport",jasperReport1);"subds",new JRBeanCollectionDataSource(projects));new JRBeanCollectionDataSource(employeeList);}
String subFileSrc =getServlet().getServletContext().getRealPath(
String subFileDest =getServlet().getServletContext().getRealPath(
List employeeList = reportsHelper.getEmployeeDetails123(department,employee,status,type,loginUnitId,subFileSrc,subFileDest);
System.
ActionMessage noData =
messages.add(
saveMessages(request, messages);
}
-
generateMethod looks like this:new PaReportsHelper();"reports/Employee_subreport1.jrxml");"reports/Employee_subreport1.jasper");out.println("List Size:"+employeeList.size());if(employeeList.size() == 0 ){new ActionMessage("PA.PaEmpReportsByStatusAction.generateReport.noData");"noData", noData);return mapping.findForward("noRecords");try{
// JasperCompileManager.compileReportToFile(getServlet().getServletContext().getRealPath("reports/PaEmployeeDetailReport.jrxml"), getServlet().getServletContext().getRealPath("reports/PaEmployeeDetailReport.jasper"));
JasperDesign jasperDesign1 = JRXmlLoader.load(subFileSrc);
JasperReport jasperReport1 = JasperCompileManager.compileReport(jasperDesign1);
JasperCompileManager.compileReportToFile(subFileSrc,subFileDest );
List projects = reportsHelper.employeeProjectDetails(
File fileSrc =
File destFile =
JasperDesign jasperDesign = JRXmlLoader.load(fileSrc);
JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
java.util.Map parameters =
parameters.put(
parameters.put(
JRBeanCollectionDataSource ds =
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, ds );
JRExporter jrExporter =
new Integer(5));new File(getServlet().getServletContext().getRealPath("reports/PaEmployeeDetailReport.jrxml"));null; new java.util.HashMap();"subReport",jasperReport1);"subds",new JRBeanCollectionDataSource(projects));new JRBeanCollectionDataSource(employeeList);null;PaReportsHelper reportsHelper =
String subFileSrc =getServlet().getServletContext().getRealPath(
String subFileDest =getServlet().getServletContext().getRealPath(
List employeeList = reportsHelper.getEmployeeDetails123(department,employee,status,type,loginUnitId,subFileSrc,subFileDest);
System.
ActionMessage noData =
messages.add(
saveMessages(request, messages);
}
-
I am filling the main report like this:
----------------------------------------
File fileSrc = new File(getServlet().getServletContext().getRealPath("reports/PaEmployeeDetailReport.jrxml"));
File destFile = null;
JasperDesign jasperDesign = JRXmlLoader.load(fileSrc);
JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
java.util.Map parameters = new java.util.HashMap();
/*employeeList is the EmpDetail List*/
JRBeanCollectionDataSource ds = new JRBeanCollectionDataSource(employeeList);
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, ds );
------------------------------------------------------------------------------
i want to fill sub report also
Please help me......Please see the files:
MainReport : PaEmployeeDetailReport.jrxml
sub report : Employee_subreport1.jrxml
Method in java class is :
generateReport()
-
I am filling the main report like this:
----------------------------------------
File fileSrc = new File(getServlet().getServletContext().getRealPath("reports/PaEmployeeDetailReport.jrxml"));
File destFile = null;
JasperDesign jasperDesign = JRXmlLoader.load(fileSrc);
JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
java.util.Map parameters = new java.util.HashMap();
/*employeeList is the EmpDetail List*/
JRBeanCollectionDataSource ds = new JRBeanCollectionDataSource(employeeList);
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, ds );
------------------------------------------------------------------------------
i want to fill sub report also
Please help me...... -
In this employeeList is the arryList i am fiiling the main report.In that it is having EmpDetail bean class.For each it has empCode ,for ecah code i want Project details to fill as arrayList.In Main report i am passing parameter as $P{empCode}
where i have to check the condition and where i ahave to fill the sub report as arryList based on EmpCode.
Thank you,
My problem is for the main report i am using EmpDetail bean class
and for sub report i am using ProjectDetails bean class.
first i am filling the main report like this :
---------------------------------------------------------------------new File(getServlet().getServletContext().getRealPath("reports/PaEmployeeDetailReport.jrxml"));null; new java.util.HashMap();//parameters.put("subReport",jasperReport1);
JRBeanCollectionDataSource ds =
JRBeanCollectionDataSource(employeeList);
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, ds );
new-----------------------------------------
File fileSrc =
File destFile =
JasperDesign jasperDesign = JRXmlLoader.load(fileSrc);
JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
java.util.Map parameters =
-
hi
I am generating jasper reports with out writing any query string in .jrxml files.I am using JRBeanCollectionDataSource.
I am facing problems in sub reports.
main report having the fields like empCode,Name only.
These fields are getting throguh EmpBeans as an arrylist to passing a parameter to JRBeanCollectionDataSource.
Based on empcode i am getting the employee projects done have to shown using sub reports.
These projects are under another ProjectBean.
How can i fill the sub report based on the empCode.Please help me.
If i use query strings in jrxml there is no problem in ireport.
-
I understood the usage of subreports.I developed the main report and sub report using IREPORT tool.In i report i am directly connecting the database.So both reports are working fine.
My problem came when i am using the application.
In the application i am using JRBeanCollectionDatasource for the Report data as a ArrayList of BeanClasses.
Could you please help me how to pass parameter to sub report from the main report in the application.
-
Hi to all,
I am using jasper reports with struts.It is working fine.I am passing arrylist from java to the JasperDesign.
Upto now i am using a Java Bean with String properties only.
Now i want to use the ArrayList fileds in the Beans.Please help me to display the arrayList fields in the reports.
Thank you,
-
Hi to all,
I dont know how to use sub reports in the main report.i want help from u who are having knowledge on sub reports.And i want how to pass parameter from main report data to the sub report.Please help me .
-
Hi to everyone,
I dont know how to use the crossTab in Jasper reports for matrix form representation of Data.Please help me if any one know this.
-
HI,
Just populate the data in the form of Bean classes and put all the beans information in the List and pass that list to the parameter to the JRBeanCollectionDataSource class.Thats it. One more thing is u have to add 2 jars:JFreeChart.jar and JCommon.jar
Sub Reports
in Products
Posted
i am not using any sub report.Only single report .And i want the ArrayList data to be printed in the report.
i just put the filed like <filed name="projectDeatils" class="java.util.ArrayList"/>
i dont know how to print the ArrayList data.