Hi All,
I coded like this:
private void generateTEXTOutput(JasperPrint jasperPrint,String filename)throws IOException, JRException {
try
{
String fName=filename+".txt";
JasperPrintManager.printReport(jasperPrint, true);
JRTextExporter exporter1 = new JRTextExporter();
exporter1.setParameter(JRTextExporterParameter.CHARACTER_WIDTH, jasperPrint);
exporter1.exportReport();
}catch (JRException jre) {
jre.printStackTrace ();
}
}
try
{
String fName=filename+".txt";
JasperPrintManager.printReport(jasperPrint, true);
JRTextExporter exporter1 = new JRTextExporter();
exporter1.setParameter(JRTextExporterParameter.CHARACTER_WIDTH, jasperPrint);
exporter1.exportReport();
}catch (JRException jre) {
jre.printStackTrace ();
}
}
But it is not exported .txt file.
What is the problem?
Plz., me the solution.
Thanks & Regards,
Mohan