Print When Expression acts different when scheduled vs run on server
Posted on February 27, 2017 at 9:18am
Hi all,
I have the following expression on a subreport "Print When Expression":
$P{Show_Customer_Synopsis}==Boolean.TRUE
This works fine when running the report on Jasper Server and shows/hides the subreport as desired, based on the selection of a checkbox.
The issue I am having is that when I schedule the report to run, using JASPER SERVER/Scheduled Jobs, the subreport does not show/hide based on the selected parameter value. It does not show at all.
The parameter checkbox does show when I make the schedule and all the other base subreports will run and (in this case) attach to an e-mail properly.
If I remove the "Print When Expression" and leave it blank the sub report does display in the resulting e-mail attachment.
Am I using an incorrect statement for the "Print When Expression"?
Is there a server setting that would affect the handling of the "Print When Expression"?
Any insite would be appreciated.
thanks!
Joined: Oct 12 2015 - 12:03pm
Last seen: 2 years 10 months ago
Posted on February 27, 2017 at 1:50pm
Joined: Apr 24 2010 - 4:31pm
Last seen: 4 years 3 months ago
Posted on February 27, 2017 at 3:51pm
Thank you for the suggestion hozawa, but I have set the parameters via the parameters tab.
When I check the {Show_Customer_Synopsis} parameter (checkbox) on the scheduled report, and run the schedule, it does not include the associated subreport, but if I run the same report from the library of jasper server (selecting the checkbox) it does include the sub report.
I can't help but think it has something to do with the "Print When Expression" handling since if I have no "Print When Expression" then it will include the subreport in the scheduled output. Currently I use the expression: $P{Show_Customer_Synopsis}==Boolean.TRUE
Joined: Oct 12 2015 - 12:03pm
Last seen: 2 years 10 months ago