Jump to content
We've recently updated our Privacy Statement, available here ×

only this line give me error jasperPrint = JasperF


mfa

Recommended Posts

hi mster

sir i tyr to create pdf with out database blank

 

for that i use this code

 

 

String reportSource = "./WEB-INF/reports/test.jasper";

String reportDest = "./reports/test.html";

ExternalContext econtext = getExternalContext();

InputStream stream = econtext.getResourceAsStream(reportSource);

JasperPrint jasperPrint = null;

jasperPrint = JasperFillManager.fillReport(stream, null,null);

 

//JasperExportManager.exportReportToPdfFile(stream, "simple_report.pdf");

 

JRExporter exporter = null;

HttpServletResponse response = (HttpServletResponse)econtext.getResponse();

FacesContext fcontext = FacesContext.getCurrentInstance();

exporter = new JRPdfExporter();

exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);

// exporter.setParameter(JRExporterParameter.OUTPUT_STREAM,response.getOutputStream());

//exporter.exportReport();

fcontext.responseComplete();

 

 

 

 

but sir only this line give me error

 

 

jasperPrint = JasperFillManager.fillReport(stream, null,null);

 

 

 

please give me idea how i get pdf

 

 

thanks'

aamir

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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