Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing count from subreport to main

Status
Not open for further replies.

SarahMS

Technical User
Sep 7, 2001
32
US
Can anyone help me with a way to make the caption on my main report display the number of records in the subreport without attaching the subreport database to the main report?

What I am trying to build is a main report with many on-demand drill-down subreports. The caption for each subreport that needs to show on the main report is the number of records in the subreport. There will be five sql views, and each subreport will be linked to one view, but there will be multiple subreports for each view, with different selection criteria in the subreports. I would really like to be able to take the captions (number of records in the subreport) and create fields in the main report from summing of the subreports - total of subreport 1 + total of subreport 2 - total of subreport 3 = field on main report.

One of the problems I'm running up against is the fact that there is no kind of linking between anything in the subreports, so I can't attach them to the main report. I am able to get the number I want (number of records in the subreport) to show up in A caption IF the view is attached to my main report, but I don't think I can attach all of them to the report, since there is no linking. Another problem would be creating counts with all the criteria included in the subreport. Isn't there any other way to do this?

Thanks for any help you can give!

Sarah
 
perhaps you should be thinking about shared variables...then you can pass info between your subreports
 
how about using something on the sql side to bring all of this together for you and spit it out on your main report?

lmc
cryerlisa@hotmail.com
 
Ngolem,

Thanks for the tip - I think that's probably what I needed.

LMCRYER,

The only problem with this is that I need the numbers on the main report, and a drill-down for each number to individual listings for each record counted.

Due to time constraints, I think we have decided to just go ahead and get the numbers from sql and then make a seperate report with a list of the cases counted for now. This will minimize what needs to be done in crystal, and won't take much time (in comparison) to develop. Thanks for your help.

Sarah
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top