2006 IR Open Dicussion Posted August 27, 2006 Share Posted August 27, 2006 By: Yves - y_lavoie Create a report 2006-03-09 07:44Hi, In my application we create report in a string buffer without save on disk, is it possible to create report from a buffer with JasperReport?? Thanks Yves By: Sanjeev Saha - sanjeevsaha RE: Create a report 2006-03-13 06:57Hello Yves: It is certainly possible to create a report from a buffer. Here's an example to get the report design using a String. InputStream inputStream = new java.io.ByteArrayInputStream(stringDesign.getBytes("UTF-8")); JasperDesign jDesign = JRXmlLoader.load(inputStream); jDesign will now be the object model used by the Jasper engine to compile the report and generate the JasperReport object. For your situation, you'll need to convert the buffer into a byte[] depending on what kind of buffer it is. hth, Sanjeev By: stone_cold - bssai RE: Create a report 2006-03-13 20:46Hi Sanjeev, I am new to Jasper reports. I want to create reports using JR and i am gettign the data from d/b. We are using the hibernate db. One of the problem i am facing is I dont want to use the .jrxml file to get my design template instead i want to do it with noxmldesign. If u see the src in JR under the demo/samples folder u have sumthing called as noxmldesign which tells u how to do create a report without using an xml template(thats basically by creating a JasperDesign Object) now comming back to my actual query : if u look into this files...we have a setQuery () method which queries the data and retreives it..but my problem is i already have the data and i dont want to requery is there any way possible to do it. Or even if possible can u let me know about the sequential order of generating reports using the JasperDesign object. Looking ahead for +ve reply. AC..:-) 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