------------------------------------------------
Anybody.......PLEASE HELP me solve this problem.
------------------------------------------------


Hi all,

I am using      JasperPrint.getPages().size() to determine if the report has
data in it or not.

Depending on the result I m forwarding it to an error page if it doesn't
have data.

It works fine with html and excel format. However, if I am unable to use it
in my pdf report as in my pdf report it doesn't return a jasper print object
, it returns bytes.
Below is the code for my pdf servlet.

Would anybody please help me as to how can I determine if teh report has any
data or not in my pdf format.

Thanks & Regards,
Meenakshi.

                bytes =
                                JasperRunManager.runReportToPdf(
                                        reportFile.getPath(),
                                        parameters,
                                        con);



                        response.setContentType("application/pdf");
                        response.setContentLength(bytes.length);
                        ServletOutputStream ouputStream = 
response.getOutputStream();
                        ouputStream.write(bytes, 0, bytes.length);
                        ouputStream.flush();
                        ouputStream.close();


                }



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
jasperreports-questions mailing list
jasperreports-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jasperreports-questions



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
jasperreports-questions mailing list
jasperreports-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jasperreports-questions

Reply via email to