Jump to content
Changes to the Jaspersoft community edition download ×

Jasper Reports using JRTextExporter issue

Recommended Posts

By: Shikha Meena - shikhameena

Jasper Reports using JRTextExporter issue

2006-05-09 03:01



In our project we are using the JasperReports-1.2.0 . The requirement in this project is such that a report can be used to generate the PDF , HTML , XLS or it can be used to print to a Laser printer or to the Dot Matrix printer.


Now to print on the Dot Matrix printer I have used the JRTextExporter to convert the .jrprint file into TXT file. But in the generated .Txt file the printed area seems to be less & the data is truncated . I have specified the pageWidth="842" & pageHeight="595" & orientation="Landscape" but I think JRTextExporter is not using these values as the .txt output is generated in half the size of that. If the same report is generated in the PDF format the page size and the data populated comes to be fine on it .


I have tried changing the parameter setting of the JRTextExporter to increase the size of the .txt file (JRTextExporterParameter.PAGE_HEIGHT and the JRTextExporterParameter.PAGE_WIDTH ) but this doesn't seem to work.



Please guide me in resolving this difference of element positioning and page size setting of .txt file.


Is this a known issue with JRTextFormatter , is there a workaround or patch (Fix) for this available ?


Should I use any other approach to achieve the same?


Any suggestions and views are welcome.


Many Thanks...






By: Ionut Nedelcu - ionutned

RE: Jasper Reports using JRTextExporter issue

2006-05-09 06:11



The text exporter requires special attention at design time. For example if in the original report template there are a lot of very small text fields, the required page size for text export should be as large as possible, because in text mode one character always occupies the same space and the original size in the report template is irrelevant. A report with a lot of small text in a small area is unlikely to behave well when exported to text. So the best practice is to create separate report designs for exporting to text.


See the JavaDoc for more details.



Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...