PrintWhen expression and parameter

By: Ash - evilzash
PrintWhen expression and parameter
2005-03-24 07:37
I use the following PrintWhen expression for a band.

new Boolean($P{DispOpt}=="SUMMARY")

But when i pass the parameter through a post method from a HTML page the band is not shown.
In my servlet i do the following to pass the parameter...

String dispParam=request.getParameter("DispOpt");
parameters.put("DispOpt", dispParam.toUpperCase());

I can see in a textfield in the report that the correct value is recieved but the band is not shown.
if i hard code the parameter value
dispParam="SUMMARY" it works.

Any ideas?

By: Friedemann Becker - fnbecker
RE: PrintWhen expression and parameter
2005-03-26 05:20
Try to get an introduction to java, if you want to use expressions like this (and more complicated), this is a typical beginners mistake.

The right thing to do here is
new Boolean($P{DispOpt}.equals("SUMMARY"))

because you don't want to compare references but values.

but maybe you just forgot ;-)
2004 IR Help's picture
Joined: Aug 17 2006 - 3:49am
Last seen: 16 years 9 months ago

0 Answers:

No answers yet