This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Other Java Products and Servers and the fly likes Jasper Report Parameters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Jasper Report Parameters" Watch "Jasper Report Parameters" New topic

Jasper Report Parameters

Dennis M Kavanagh

Joined: Mar 26, 2007
Posts: 6

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.


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

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


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);

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

Thanks for any ideas...
I agree. Here's the link:
subject: Jasper Report Parameters
jQuery in Action, 3rd edition