anantavijayguha Posted June 22, 2007 Share Posted June 22, 2007 Hi,I am using jrxml generated by ireports 2.0.0. I have written the following java code and trying to run it.Code:public static void main(String[] args) {JasperReport jasperReport;JasperPrint jasperPrint;try { Class.forName("com.mysql.jdbc.Driver"«»).newInstance(); Connection con = DriverManager.getConnection("jdbc:mysql:///test", "root", "security"«»); jasperReport=JasperCompileManager.compileReport("reportXMLs/Untitled_report_1.jrxml"«»); jasperPrint=JasperFillManager.fillReport(jasperReport,new HashMap(),con); JasperExportManager.exportReportToPdfFile(jasperPrint,"reports/simpleReportwithPieChart.pdf"«»);} catch (JRException e) { ....... There is no error on running. The PDF file created is blank.When using JViewer Preview Pdf , the pdf is fine. Any help will be useful.Thanks in advance [file name=Untitled_report_example.jrxml size=6734]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/Untitled_report_example.jrxml[/file] Link to comment Share on other sites More sharing options...
akgaddipati Posted June 23, 2007 Share Posted June 23, 2007 1. Check to see if data is available. 2. Check if the Feilds are properly mapped Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now