Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning 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
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

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

 
reply
    Bookmark Topic Watch Topic
  • New Topic