Jump to content
We've recently updated our Privacy Statement, available here ×

PrintWhen expression and parameter


2004 IR Help

Recommended Posts

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

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...