Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Jasper Reports ..How To..???

 
Ranch Hand
Posts: 340
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I used iReport to create a report in JasperReport...and i was very much successful in creating it...

But the Biggest Porblem is that I am not able to open it from my Java Application...i tried a lot...but all in vein....

Its a humble request, if anyone could give me a step by step HOW TO..
for connecting my report to java..
I have a .jrxml file and a .jasper file..

Hope to get a quick responce from you people...

Thanks A Lot....
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

1. Create a DataSource Object: (this example uses an XML file as data source)


2. Compile your .jrxml file:


3. Create a JasperPrint object by filling in the compiled report with your data source:

params is your report parameter map.

4. Use any of the JasperExportManager or JasperPrintManager method to export or to print your JasperPrint object:



I hope this helped,

Ramses
[ December 09, 2005: Message edited by: Ramses L. ]
 
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, if you haven't taken a look at the included samples, perhaps it is time to do so. There simple to follow, yet should help get you started. The samples come with JR downloads.
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ramses,
One thing for you.....

If i want to use a common stream to stream theJasperPrint to an object and export the generated o/p to html or xls or pdf file.....
is there any common stream format......or method to do it....

 
You totally ruined the moon. You're gonna hafta pay for that you know. This tiny ad agrees:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!