I have a report with a sub report. The sub report is brings over summed numbers. The main report has 3 groupings. Does the sub report require the same groupings in order to get the totals calculated correctly?
Hope this is enough info.
THANKS!!!!
If you place the subreport in the report header or footer, then it could cover all the data and ignore groupings in the main report.
If you want it 'per group', put it in the group header or footer and use Edit > Subreport Link to pass down the group value.
Note that each run of a subreport sends a fresh request for data to the server. Running it just once is more efficient.
You don't say just what the 'summed numbers' are. You can create summary totals or running totals for the whole report, shown in the reoprt footer. This would be more efficient, if your business need allows it.
Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10
Thank you for your reply. I do want it "per group". But I want if for group #3. So do I only have to pass in the value for group #3 to the subreport and not the values of group 1 and group 2?
Does my subreport have to have the same grouping as group #3 in the main report?
Thanks!
When you say linked, do I also have to set the parameters equal to each other in the subreport? For example:
{Puchase.PurchasGroup} = {?Pm-?Purchasing Group}
Or do I just need to link them within the change import links menu?
If you mean report parameters, and you want them to apply to the subreport, then yes, you should link those also. Most of the time, you can select the parameter for the main report link and then it will automatically try to link to the corresponding field in the subreport (make sure it chooses the correct one). In the case of dates, where you might want a value to be > or <, after creating the link, go into the subreport record selection formula area and make sure the subreport date field is set up correctly in relation to the parameter value.
Do the reports have to be linked by the main reports grouped field? Because my subreport does not have a field to link to one of the grouped fields in the main report.
But I do not think the totals will come out correctly if the common fields are not linked.
Hopefully this makes sense.
THANKS!
You can make a link to a field of suitable data-type. This will add a selection statement to the subreport's record selection, Report > Selection Formulas > Record. But you can remove the selection criterion and still have the field available in the subreport
Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10
Actually, you don't HAVE to link on every group, if the logic of the report doesn't dictate it. When you link, you should be thinking about what you want to appear each time the subreport is executed. Each link you add is like a record selection criterion that will narrow what appears in the subreport. If you have a groups on country, year, and store, and you wanted to show sales for the store in a particular country per year, you would link on all three groups, but if you wanted the subreport to show store sales for all years and all countries for a particular store (that may have multiple locations), then you would link only on store.
If you want more help, we will need to know what your groups are and what you are trying to show in the subreport, so that we can help you do the linking based on your particular logic.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.