aubrey.offer Posted March 8, 2013 Share Posted March 8, 2013 I can output all files except a txt file. If I set the format to text preview, I get the following error Exporting Text (JasperReports) to file... C:SubversionWMS_ReportstrunkreportsInventory_Transactions_Report.txt! Error exporting print... Character width in pixels or page width in characters must be specified and must be greater than zero. net.sf.jasperreports.engine.JRException: Character width in pixels or page width in characters must be specified and must be greater than zero. at net.sf.jasperreports.engine.export.JRTextExporter.setReportParameters(JRTextExporter.java:271) at net.sf.jasperreports.engine.export.JRTextExporter.exportReportToWriter(JRTextExporter.java:333) at net.sf.jasperreports.engine.export.JRTextExporter.exportReport(JRTextExporter.java:221) at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:1174) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) Export running time: 16This is the other Text(iReports) preview Exporting Text (iReport) to file... C:SubversionWMS_ReportstrunkreportsInventory_Transactions_Report.txt! Error exporting print... net.sf.jasperreports.engine.JRPrintText.getTextAlignment()B java.lang.NoSuchMethodError: net.sf.jasperreports.engine.JRPrintText.getTextAlignment()B at com.jaspersoft.jrx.export.JRTxtExporter.layoutGrid(JRTxtExporter.java:419) at com.jaspersoft.jrx.export.JRTxtExporter.exportPage(JRTxtExporter.java:300) at com.jaspersoft.jrx.export.JRTxtExporter.exportReportToWriter(JRTxtExporter.java:289) at com.jaspersoft.jrx.export.JRTxtExporter.exportReport(JRTxtExporter.java:257) at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:1174) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) Export running time: 16Any other format (other than the above formats) are fine. Any assistance will be greatly appriciated.RegardsAubrey Link to comment Share on other sites More sharing options...
arun.mitteam Posted March 12, 2013 Share Posted March 12, 2013 Hi Aubrey,Did you find solution for this issue? I have exact same issue.Thanks,Arun Link to comment Share on other sites More sharing options...
aubrey.offer Posted March 13, 2013 Author Share Posted March 13, 2013 not yet, I am trying to remove all traces of java and iReports and start again. Would be nice if we could find out how it picks up the formatting from the internal previewer and sets them in the export options. Link to comment Share on other sites More sharing options...
arun.mitteam Posted March 13, 2013 Share Posted March 13, 2013 I have found the solution for this issue. When we use the Text Preview we should set few more parameters to make it work.Go to Tools-->OptionsSelect Export Options tab --> Select Text from left paneSet values for Character Width, Character Height, (The values I have set 7 and 13.9) Page width and Height. Now try generating the report and it will work. Try setting different values to make it fit properly.The only ISSUE i have now is - it inserts BLANK LINES when there are page breaks. TRYING TO AVOID THOSE BLANK LINES.Hope this helps and if anyone finds the solution for page break blank lines, let me know. Link to comment Share on other sites More sharing options...
aubrey.offer Posted March 14, 2013 Author Share Posted March 14, 2013 I found the same solution, i have also refined it a bit. For A4 paper landscape, using Courier new (8), I am using the following settings which seem to work (Still to test the actual printing of the file) character Width 0, Character Height 0, Page width 175, page height 29. Hope this helps. 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