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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Data from subreport to main and doing a calculation

Status
Not open for further replies.

MrHelpMe

Technical User
May 1, 2001
203
CA
Hello, I will try to explain this as best as I can. I have a subreport within a main report and what I am trying to do is pass values from the subreport;however the values are captured from a group in the subreport. ie.
YTD Count(75%) = $14,500.00
YTD Count(100%) = $8,123,456.15
I need to take the $14,500.00 as well as the $8,123,456.15 and divide this number in the main report by the values that are also grouped in the main report and display this in the main report.
Therefore I will paint the picture;
Subreport = YTD Net Sales(75%) = $14500.00
YTD Net Sales(100%) =$8,123,456.15
Main Report = YTD Count(75%) = 70
YTD Count(100%) = 120
Now I need to take the values for each level(75, 100%) and divide by the YTD count(75 and 100%) and display on main report. ie. (75%) = $145000.00 / 70 = ?
(100%)= $8,123,456.15 / 120 = ?
This will give me an average for each level. I hope this is clear. I am using crystal 8.0. Thanks
 
You will need to link the subreport to each group, and bring back the value separately. That means putting the subreport in the Group Header or footer, and adding a "subreport link" using the field that the two reports have in common. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top