Jump to content
Changes to the Jaspersoft community edition download ×

Alignmnt Prob in ireport & web application in text


jothik.balaji

Recommended Posts

#000080]#008000]Hi experts,

 

I am using ireport 1.2.8 tool.

I had created report in ireport 1.2.8 for text format.

In report ,it showing some alignment & if i will run the report through web application servlet, i am getting some different alignment ..

 

Browser : mozilla firefox 1.0.7

Protocol:HTTP

 

Can u pls help me..

This is very very urgent for me..

 

 

Code i used in the servlet for generating text format:-

 

jasperPrint = JasperFillManager.fillReport(context

.getRealPath(filePath), hashmap, connection);

data.setReportFileName(reportFileName + ".txt");

exporter = new JRTextExporter();

byte[] rptByteArr = exportReportToBytes(jasperPrint, exporter);

 

 

 

 

private byte[] exportReportToBytes(JasperPrint jasperPrint,

JRTextExporter exporter) throws JRException {

byte[] output;

 

ByteArrayOutputStream outPutStream = new ByteArrayOutputStream();

exporter .setParameter(JRTextExporterParameter.JASPER_PRINT, jasperPrint);

exporter.setParameter(JRTextExporterParameter.OUTPUT_STREAM,

outPutStream);

exporter.setParameter(JRTextExporterParameter.PAGE_WIDTH, new Integer(

120));

exporter.setParameter(JRTextExporterParameter.CHARACTER_HEIGHT,

new Integer(10));

 

exporter.exportReport();

 

output = outPutStream.toByteArray();

 

return output;

}

 

 

 

 

 

Regards,

Balaji B

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...