• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Jasper Report Parameters

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I am a bit confused..I have 2 related questions

1. I have a .jasper file wih a Parameter requiring some D/B access for its value.

ok...

Do I have to use code like: Map parameters = new HashMap();
parameters.put("Report_Title");

in order to cause the D/B to access the already exisitng parameter in my .jasper file? I already have the parameter defined

OR

Will the .jasper file recognize the need to access the D/B and execute the associated .sql startment as defined (?)
in .jasper file.

I have the D/B code in place...

2. I do not have any parameters in a new .jasper file.
I have one field value, Report Title, and associated field variable : $F{ReportTitle}

After I create the .jasper file in ReportDesigner 4.1.1, I cannot convert it to a pdf. using following code as
I get a NULL Exception Pointer error. The following code is based on the example on p.43 of the iReport Ultimate Guide.:

HashMap hm = new HashMap();

JasperPrint print = JasperFillManager ( fileName, hm, new JREmptyDataSource);
JasperExportManager.exportReportToPdfFile(jasperPrint,"C:/jasperReports/demo.pdf");


This is very confusing..........

Thanks for any ideas...
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic