dprogrammer Posted June 23, 2016 Share Posted June 23, 2016 Dear Folks,I've spend almost whole day today in trying to figure out what I am doing wrong. I would really appreciate if someone could point out where I am doing wrong. I've a main report and two sub reports. Main report: Group1 on ORGID field. That ORGID field is then passed as a parameter to $P{subORGID} parameter for both subreports. First sub-report is a details report, it's in Group1 footer band, and prints data for each ORGID on a separate page. That part is working fine. The second sub-report is with grand totals for each ORGID. Hence I've placed it in Summary section of the main report. I've also linked that sub-report with main report's field $F{ORGID} = $P{subORGID}. For some reason the subreport is not able to get all ORGIDs in the parameter and is not returning any rows. If I only run the main report for one ORGID, say specifying in WHERE claues ORG.ORGID='1001', the grand total sub-report works fine and brings back data for that ORGID. But when I remove the WHERE clause and want to see all ORGIDs, the grand total sub-report just comes blank. Should I change the type of $P{subORGID} to a collection etc.? Or I am missing something? Link to comment Share on other sites More sharing options...
sanbez Posted June 24, 2016 Share Posted June 24, 2016 Question is unclear. Field of main report haven't value in summary band Link to comment Share on other sites More sharing options...
dprogrammer Posted June 24, 2016 Author Share Posted June 24, 2016 Sorry, here is more details: Main report sample data: This report pulls all ORGIDS for a given date.ORGID: 1001EAST REGION 2016/01/01 $5000 2016/06/15 $4000WEST REGION 2016/05/31 $3000 2016/06/12 $2000ORGID: 1002EAST REGION 2016/02/01 $1000 2016/05/15 $1500WEST REGION 2016/05/01 $6000 2016/06/13 $4000 This is how the Grand total report should like for ORGIDs 1001 and 1002.ORGID Total Sales1001 $140001002 $12500 But it does not seem to get ORGID value from main report correctly. It only works when I hardcode main report for either ORGID=1001 or 1002 and shows grand totals for only one ORGID. But when I run the main report for all ORGIDs the grand total report just comes up blank.ORGID Total Salesnull null Link to comment Share on other sites More sharing options...
Create Posted May 30, 2018 Share Posted May 30, 2018 Long time since you posted this. Did you ever get it to work? Or still need help? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now