Subreport Data Being Passed

Bare with me since I have only been using iReport for 3 weeks but I have made significant progress in learning how this works.

Scenario:

I have a master report and a sub report.  If I run my report without parameters being passed in - based on a trace - looks like no data is getting into the subreport.  If I provide the two parameters for the main report then the subreport will print.  On the master report in the header group where the subreport resides, I am printing the two fields just to validate the data is in the group (was not sure if this was necessary).  In my parameters for the subreport I am calling it using $F{variable_name} .  Also my sql queries from both reports are returning data.  I have shared my work with three other people at the office with more time using iReports and they cant figure it out.  

So to clarify the main issue is that if parameters are given at main report creation, the subreport will print.  If no data is given for the main report, and the query finds this data for the subreport instead then subreport runs perfectly.

If you need any additional info, let me know.  Thank you ahead of time.  P.S. - Not always the best at explaining technical stuff :-)

john.oconnor_1's picture
Joined: Mar 12 2017 - 9:34am
Last seen: 6 years 3 weeks ago

1 Answer:

I figured it out... It was actually do to my expression to print based on a count that was in my intense query and only counted when data was being passed into the query.  So I removed the expression on when the sub report prints and it works.  So happy.  

john.oconnor_1's picture
Joined: Mar 12 2017 - 9:34am
Last seen: 6 years 3 weeks ago
Feedback
randomness