  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | Subject: Re: Datasource is null in JasperReports integration | Subject: Re: Datasource is null in JasperReports integration 2007-11-01 - By carmi_cd
Back
i have done what you suggested but got the same errors..thanks again.
strutstwouser wrote: > > I guess you need to have reportData as a field in the Action and do > setReportData(reportData) in execute() after populating it. > > On 10/26/07, carmi_cd <carmi_dom@(protected)> wrote: >> >> >> i'm new in integrating JasperReports and Struts 2..my problem is its >> always >> saying that my datasouce is >> null so it displays a pdf file with all the labels in it without anything >> on >> the detail part..my datasource >> is an ArrayList of Personnel object, i name it reportData. >> >> here is part of my code.. >> >> >> public class EIS_HR_004_JASPER extends eisSupport { >> private String reportId; >> private String dateStart = null; >> private String dateEnd = null; >> private Report thisReport; >> private String dateRange; >> private ArrayList<Personnel> reportData; >> >> public String execute(ActionMapping mapping,ActionForm form, >> HttpServletRequest request, HttpServletResponse response) >> throws Exception { >> ReportBean reportBean = new ReportBean(); >> setThisReport(reportBean.getReport(getReportId())); >> reportData=new ArrayList<Personnel>(); >> Personnel p1=new Personnel(); >> p1.setSurname("De la Cruz"); >> p1.setFirstname("Juan"); >> p1.setExamcode("CSC111"); >> p1.setExamdate("January 1,2003"); >> Personnel p2=new Personnel(); >> p2.setSurname("Hepburn"); >> p2.setFirstname("Audrey"); >> p2.setExamcode("CSC222"); >> p2.setExamdate("December 2,2003"); >> >> reportData.add(p1); >> reportData.add(p2); >> >> return SUCCESS; >> } >> >> public ArrayList<Personnel> getReportData() { >> // setReportData(); >> return reportData; >> } >> >> } >> >> >> thanks in advance for your help. >> -- >> View this message in context: >> http://www.nabble.com/-S2-Datasource-is-null-in-JasperReports-integration -tf4695652.html#a13422205 >> Sent from the Struts - User mailing list archive at Nabble.com. >> >> >> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ >> To unsubscribe, e-mail: user-unsubscribe@(protected) >> For additional commands, e-mail: user-help@(protected) >> >> > >
-- View this message in context: http://www.nabble.com/-S2-Datasource-is-null-in -JasperReports-integration-tf4695652.html#a13526998 Sent from the Struts - User mailing list archive at Nabble.com.
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: user-unsubscribe@(protected) For additional commands, e-mail: user-help@(protected)
|
|
 |