Re: [S2] ArrayList of Object as datasource in JasperReports

2008-01-02 Thread dasariprasad

file uploaded

prasad DTR

carmi_cd wrote:
> 
>   
> I need a tutorial that uses ArrayList of Object as datasource
> for JasperReports..do you know any? 
> 
http://www.nabble.com/file/p14590214/JasperReports-struts2.doc
JasperReports-struts2.doc 
-- 
View this message in context: 
http://www.nabble.com/-S2--ArrayList-of-Object-as-datasource-in-JasperReports-tp13580062p14590214.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Fw: [S2] ArrayList of Object as datasource in JasperReports

2007-11-08 Thread Martin Gainty
can we see your copy of apps/reports/templates/hr004.jrxml

M--
- Original Message -
From: "carmi_cd" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, November 08, 2007 8:31 PM
Subject: Re: [S2] ArrayList of Object as datasource in JasperReports


>
> here is the complete struts.xml
> 
>  extends="struts-default,jasperreports-default">
> 
> 
> Login_input
> 
> 
> /apps/Menu.jsp
> 
>
> 
> 
> /apps/modules/Toolbar.jsp
> 
> 
> /apps/SessionExpired.jsp
> /apps/modules/Hrmis.jsp
> 
> 
> /apps/SessionExpired.jsp
> /apps/modules/FNU.jsp
> 
> 
> /apps/SessionExpired.jsp
> /apps/modules/Engineering.jsp
> 
> 
> /apps/modules/UserMgt/List.jsp
> 
> 
> 
> UserMgt
>  name="input">/apps/modules/UserMgt/EntryForm.jsp
> /apps/modules/UserMgt/Error.jsp
> 
> 
> /apps/SessionExpired.jsp
> /apps/reports/ReportGenerator.jsp
> 
>
> 
>  class="eis.report.ReportFilterForm_{1}">
> /apps/reports/ReportFilterForm_{1}.jsp
> 
>
> 
> 
> /apps/reports/ReportNotFound.jsp
> /apps/reports/EIS_HR_{1}.jsp
> 
> 
> /apps/reports/ReportNotFound.jsp
> /apps/reports/EIS_FN_{1}.jsp
> 
> 
> /apps/reports/ReportNotFound.jsp
> /apps/reports/EIS_EG_{1}.jsp
> 
>  class="eis.report.EIS_HR_004_JASPER">
> /apps/reports/ReportNotFound.jsp
> 
> apps/reports/templates/hr004.jasper
> reportData
> PDF
> 
> 
>
> 
>
> 
> /apps/Login.jsp
> Home
> 
> 
> /apps/{1}.jsp
> 
> 
> 
>
> please help me i've been thinking of it for a long time now..thanks
again..
>
>
> strutstwouser wrote:
> >
> > Can you paste the entire struts.xml ; ensure that you have :
> >
> > 
> >
> >
> >
> > On Nov 7, 2007 8:51 PM, carmi_cd <[EMAIL PROTECTED]> wrote:
> >
> >>
> >> hi actually i tried using that tutorial and got a pdf with no data in
it
> >> only
> >> page and column titles.
> >> i dont know why..
> >>
> >> Stacktrace of my sun application server, it has no problem. i dont know
> >> why
> >> the report is not filled with the data. here is my code:
> >>
> >> public class EIS_HR_004_JASPER extends eisSupport {
> >>private String reportId;
> >>private String dateStart = null;
> >>private String dateEnd = null;
> >>private String pdfFile;
> >>private final static String _REPORT_FOLDER = "EIS_HR_003";
> >>private Report thisReport;
> >>private String dateRange;
> >>private ArrayList reportData = new
ArrayList();
> >>
> >>public String execute(ActionMapping mapping,ActionForm form,
> >>HttpServletRequest request, HttpServletResponse response)
> >>throws Exception {
> >>ReportBean reportBean = new ReportBean();
> >>setThisReport(reportBean.getReport(getReportId()));
> >>setReportData();
> >>try {
> >>JasperCompileManager.compileReportToFile(
> >>"apps/reports/templates/hr004.jrxml",
> >>"apps/reports/templates/hr004.jasper");
> >>} catch (Exception e) {
> >>System.out.println("empty");
> >>e.printStackTrace();
> >>return ERROR;
> >>}
> >> return SUCCESS;
> >>}
> >>
> >>public String getReportId() {
> >>return reportId;
> >>}
> >>
> >>public void setReportId(String reportId) {
> >>this.reportId = reportId;
> >>}
> >>
> >>public String getDateStart() {
> >>if (this.dateStart == null || this.dateStart.equals("")) {
> >>ResourceBun

Re: [S2] ArrayList of Object as datasource in JasperReports

2007-11-08 Thread carmi_cd
fFile;
>>}
>>
>>public Report getThisReport() {
>>return thisReport;
>>}
>>
>>public void setThisReport(Report thisReport) {
>>this.thisReport = thisReport;
>>}
>>
>>public String getDateRange() {
>>setDateRange();
>>return dateRange;
>>}
>>
>>public void setDateRange() {
>>this.dateRange = "( " + getDateStart() + " - " + getDateEnd() + "
>> )";
>>}
>>
>>public ArrayList getReportData() {
>>   // setReportData();
>>return reportData;
>>}
>>
>>public void setReportData() {
>>Personnel p1=new Personnel();
>>p1.setSurname("Dela Cruz");
>>p1.setFirstname("Juan");
>>p1.setExamcode("CSC111");
>>p1.setExamdate("January 1,2003");
>>Personnel p2=new Personnel();
>>p2.setSurname("Cruz");
>>p2.setFirstname("Miguel");
>>        p2.setExamcode("CSC222");
>>p2.setExamdate("December 2,2003");
>>reportData.add(p1);
>>reportData.add(p2);
>>}
>>
>> }
>>
>> here is part of my struts.xml
>>
>> 
>>/apps/reports/ReportNotFound.jsp
>>
>>apps/reports/templates/hr004.jasper
>>        reportData
>>PDF
>>
>>
>>
>> i hope you could help me..thanks a lot.
>>
>>
>>
>>
>> strutstwouser wrote:
>> >
>> > http://struts.apache.org/2.x/docs/jasperreports-tutorial.html ; I was
>> able
>> > to use this as-is and get a report fine.
>> >
>> > -Joseph
>> >
>> >
>> > carmi_cd wrote:
>> >>
>> >>
>> >> I need a tutorial that uses ArrayList of Object as datasource
>> >> for JasperReports..do you know any?
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/-S2--ArrayList-of-Object-as-datasource-in-JasperReports-tf4749173.html#a13639836
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-S2--ArrayList-of-Object-as-datasource-in-JasperReports-tf4749173.html#a13659853
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] ArrayList of Object as datasource in JasperReports

2007-11-08 Thread j alex
Can you paste the entire struts.xml ; ensure that you have :





On Nov 7, 2007 8:51 PM, carmi_cd <[EMAIL PROTECTED]> wrote:

>
> hi actually i tried using that tutorial and got a pdf with no data in it
> only
> page and column titles.
> i dont know why..
>
> Stacktrace of my sun application server, it has no problem. i dont know
> why
> the report is not filled with the data. here is my code:
>
> public class EIS_HR_004_JASPER extends eisSupport {
>private String reportId;
>private String dateStart = null;
>private String dateEnd = null;
>private String pdfFile;
>private final static String _REPORT_FOLDER = "EIS_HR_003";
>private Report thisReport;
>private String dateRange;
>private ArrayList reportData = new ArrayList();
>
>public String execute(ActionMapping mapping,ActionForm form,
>HttpServletRequest request, HttpServletResponse response)
>throws Exception {
>ReportBean reportBean = new ReportBean();
>setThisReport(reportBean.getReport(getReportId()));
>setReportData();
>try {
>JasperCompileManager.compileReportToFile(
>"apps/reports/templates/hr004.jrxml",
>"apps/reports/templates/hr004.jasper");
>} catch (Exception e) {
>System.out.println("empty");
>e.printStackTrace();
>return ERROR;
>}
> return SUCCESS;
>}
>
>public String getReportId() {
>return reportId;
>}
>
>public void setReportId(String reportId) {
>this.reportId = reportId;
>}
>
>public String getDateStart() {
>if (this.dateStart == null || this.dateStart.equals("")) {
>ResourceBundle eisProperty=ResourceBundle.getBundle("eis");
>this.dateStart = eisProperty.getString("eis.minimum.date");
>}
>return this.dateStart;
>}
>
>public void setDateStart(String dateStart) {
>this.dateStart = dateStart;
>}
>
>public String getDateEnd() {
>if (this.dateEnd == null || this.dateEnd.equals("")) {
>Calendar cal = Calendar.getInstance(TimeZone.getDefault());
>this.dateEnd = (new SimpleDateFormat("MMM d,
> ").format(cal.getTime()));
>}
>return this.dateEnd;
>}
>
>public void setDateEnd(String dateEnd) {
>this.dateEnd = dateEnd;
>}
>
>public String getPdfFile() {
>//setPdfFile();
>return pdfFile;
>}
>
>public Report getThisReport() {
>return thisReport;
>}
>
>public void setThisReport(Report thisReport) {
>this.thisReport = thisReport;
>}
>
>public String getDateRange() {
>setDateRange();
>return dateRange;
>}
>
>public void setDateRange() {
>this.dateRange = "( " + getDateStart() + " - " + getDateEnd() + "
> )";
>}
>
>public ArrayList getReportData() {
>   // setReportData();
>return reportData;
>}
>
>public void setReportData() {
>Personnel p1=new Personnel();
>p1.setSurname("Dela Cruz");
>p1.setFirstname("Juan");
>p1.setExamcode("CSC111");
>p1.setExamdate("January 1,2003");
>Personnel p2=new Personnel();
>p2.setSurname("Cruz");
>p2.setFirstname("Miguel");
>p2.setExamcode("CSC222");
>p2.setExamdate("December 2,2003");
>reportData.add(p1);
>reportData.add(p2);
>}
>
> }
>
> here is part of my struts.xml
>
> 
>/apps/reports/ReportNotFound.jsp
>
>        apps/reports/templates/hr004.jasper
>reportData
>PDF
>
>
>
> i hope you could help me..thanks a lot.
>
>
>
>
> strutstwouser wrote:
> >
> > http://struts.apache.org/2.x/docs/jasperreports-tutorial.html ; I was
> able
> > to use this as-is and get a report fine.
> >
> > -Joseph
> >
> >
> > carmi_cd wrote:
> >>
> >>
> >> I need a tutorial that uses ArrayList of Object as datasource
> >> for JasperReports..do you know any?
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/-S2--ArrayList-of-Object-as-datasource-in-JasperReports-tf4749173.html#a13639836
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: [S2] ArrayList of Object as datasource in JasperReports

2007-11-07 Thread carmi_cd

hi actually i tried using that tutorial and got a pdf with no data in it only
page and column titles. 
i dont know why..

Stacktrace of my sun application server, it has no problem. i dont know why
the report is not filled with the data. here is my code:

public class EIS_HR_004_JASPER extends eisSupport {
private String reportId;
private String dateStart = null;
private String dateEnd = null;
private String pdfFile;
private final static String _REPORT_FOLDER = "EIS_HR_003";
private Report thisReport;
private String dateRange;
private ArrayList reportData = new ArrayList();

public String execute(ActionMapping mapping,ActionForm form,
HttpServletRequest request, HttpServletResponse response) 
throws Exception {
ReportBean reportBean = new ReportBean(); 
setThisReport(reportBean.getReport(getReportId()));  
setReportData();   
try {
JasperCompileManager.compileReportToFile(
"apps/reports/templates/hr004.jrxml",
"apps/reports/templates/hr004.jasper");
} catch (Exception e) {
System.out.println("empty");
e.printStackTrace();
return ERROR;
}
 return SUCCESS;
}

public String getReportId() {
return reportId;
}

public void setReportId(String reportId) {
this.reportId = reportId;
}

public String getDateStart() {
if (this.dateStart == null || this.dateStart.equals("")) {
ResourceBundle eisProperty=ResourceBundle.getBundle("eis");
this.dateStart = eisProperty.getString("eis.minimum.date");
}
return this.dateStart;
}

public void setDateStart(String dateStart) {
this.dateStart = dateStart;
}

public String getDateEnd() {
if (this.dateEnd == null || this.dateEnd.equals("")) {
Calendar cal = Calendar.getInstance(TimeZone.getDefault());
this.dateEnd = (new SimpleDateFormat("MMM d,
").format(cal.getTime()));
}
return this.dateEnd;
}

public void setDateEnd(String dateEnd) {
this.dateEnd = dateEnd;
}

public String getPdfFile() {
//setPdfFile();
return pdfFile;
}

public Report getThisReport() {
return thisReport;
}

public void setThisReport(Report thisReport) {
this.thisReport = thisReport;
}

public String getDateRange() {
setDateRange();
return dateRange;
}

public void setDateRange() {
this.dateRange = "( " + getDateStart() + " - " + getDateEnd() + "
)";
}
   
public ArrayList getReportData() {
   // setReportData();
return reportData;
}

public void setReportData() {
Personnel p1=new Personnel();
p1.setSurname("Dela Cruz");
p1.setFirstname("Juan");
p1.setExamcode("CSC111");
p1.setExamdate("January 1,2003");
Personnel p2=new Personnel();
p2.setSurname("Cruz");
p2.setFirstname("Miguel");
p2.setExamcode("CSC222");
p2.setExamdate("December 2,2003");
reportData.add(p1);
reportData.add(p2);
}

}

here is part of my struts.xml


/apps/reports/ReportNotFound.jsp

apps/reports/templates/hr004.jasper
reportData
PDF

  

i hope you could help me..thanks a lot.




strutstwouser wrote:
> 
> http://struts.apache.org/2.x/docs/jasperreports-tutorial.html ; I was able
> to use this as-is and get a report fine.
> 
> -Joseph
> 
> 
> carmi_cd wrote:
>> 
>>  
>> I need a tutorial that uses ArrayList of Object as datasource
>> for JasperReports..do you know any? 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-S2--ArrayList-of-Object-as-datasource-in-JasperReports-tf4749173.html#a13639836
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] ArrayList of Object as datasource in JasperReports

2007-11-07 Thread strutstwouser

http://struts.apache.org/2.x/docs/jasperreports-tutorial.html ; I was able to
use this as-is and get a report fine.

-Joseph


carmi_cd wrote:
> 
>   
> I need a tutorial that uses ArrayList of Object as datasource
> for JasperReports..do you know any? 
> 

-- 
View this message in context: 
http://www.nabble.com/-S2--ArrayList-of-Object-as-datasource-in-JasperReports-tf4749173.html#a13636526
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] ArrayList of Object as datasource in JasperReports

2007-11-04 Thread carmi_cd


I need a tutorial that uses ArrayList of Object as datasource
for JasperReports..do you know any? 
-- 
View this message in context: 
http://www.nabble.com/-S2--ArrayList-of-Object-as-datasource-in-JasperReports-tf4749173.html#a13580062
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]