If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Crystal Reports > Passing group totals from Sub Report to Main Report

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-26-09, 11:53
shafeena shafeena is offline
Registered User
 
Join Date: Jun 2009
Posts: 2
Passing group totals from Sub Report to Main Report

Is it possible to pass group totals from the subreport to main report? I have group total on the subreport and group totals in the main report. What I am trying to accomplish is pass the subreport group totals to the main report next to the main report group totals.
Reply With Quote
  #2 (permalink)  
Old 06-26-09, 15:59
trowe trowe is offline
Registered User
 
Join Date: Dec 2004
Location: Connecticut
Posts: 85
You can do this with a shared variable.

Essentially, you define a variable in the main report before the subreport runs. In the subreport you set the same variable to be the value you want - equal to whatever field is appropriate. Then you display the shared variable on the main report, after the subreport runs. If you're doing something like a running total, when you reach the end of the group, reset the variable to 0.
Reply With Quote
  #3 (permalink)  
Old 06-26-09, 16:35
shafeena shafeena is offline
Registered User
 
Join Date: Jun 2009
Posts: 2
Thank You for your response. I tried using shared variable, however the shared variable only bring in the last group value from the subreport. This report is being prepared for the call center and trying to get metrics on hoe many calls are abswered at first contact and how many are escalated to the second and third tier support. So the main report has all the tickets closed in group (Benefits, Payroll, Leave etc) The subreport has all the tickets closed at first contact by the call agent in the ((Benefits, Payroll, Leave etc). So when I use the shared variable it just brings in the last number(the leave totals in the main report).
Any tips can helps...
Reply With Quote
  #4 (permalink)  
Old 07-08-09, 10:38
trowe trowe is offline
Registered User
 
Join Date: Dec 2004
Location: Connecticut
Posts: 85
You can pass whatever value you want. Assuming that the group total only appears once in the subreport, place a calculated field that sets the value of the shared variable to the group total in the subreport after the group total appears - something like "SharedVariableA=SummaryFieldThatIWant".
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On