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

Print When Expression not working


shaun.mahy

Recommended Posts

Hi,

I have a report created using version 6.0.4 Jaspersoft Studio which I'm passing a parameter to called 'IncludeEmployees' and this works fine.

This value is either set to the string value of 'True' or 'False'

I have a static label called "Employees:" on my report which I want to print or omit depending on the value of 'IncludeEmployees'.

I have set a 'Print When Expression' value of:   $P{IncludeEmployees}.equals("True")   for the field and this works perfectly when testing it in preview mode.

I'm calling the report via php and a set of phpjasperxml bits and pieces which produces the report nicely however the Employees static label appears when the parameter value is set to 'True' or 'False'. It should only appear when it's 'True'.

Also I have added a List item and this works fine in preview mode but not in live mode via PHP either. It doesn't show on the report???

Any help would be gratefully appreciated.

Shaun

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

If you report template works as designed in Jasper Studio, it should work in other applications as long as you are using the same JR engine and data source to render the report. How is your report invoked from PHP? Are you sure the parameter value is set correctly from PHP? You can display this parameter in the report title band using the expression

"parm="+$P{IncludeEmployees}+";"

to see what the actul paramter value is when running from PHP.

 

Link to comment
Share on other sites

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...