mohammad_awadat Posted November 14, 2009 Share Posted November 14, 2009 i am using this way to passing data source and run report as pdf in browser, but give error, but when change JRResultSetdataSource with jdbc connection running very will. i dont know where error ResultSet rs = stmt.executeQuery(query); JRResultSetDataSource rsds = new JRResultSetDataSource(rs); JasperDesign jasperDesign = JRXmlLoader.load(input); JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign); byte[] bytes = null; bytes = JasperRunManager.runReportToPdf(jasperReport,parmeter,rsds); response.setContentType("application/pdf"); response.setContentLength(bytes.length); servletOutputStream.write(bytes, 0, bytes.length); thanks Link to comment Share on other sites More sharing options...
lucianc Posted December 3, 2009 Share Posted December 3, 2009 What error are you getting (full stacktrace please)?Regards,Lucian 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