By: Ash - evilzash
PrintWhen expression and parameter
2005-03-24 07:37
Hi,
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");
dispParam.trim();
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 ;-)
PrintWhen expression and parameter
2005-03-24 07:37
Hi,
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");
dispParam.trim();
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 ;-)
0 Answers:
No answers yet