Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Subreport group summary to Main Report Post Reply Post New Topic
Author Message
Kuneho
Newbie
Newbie


Joined: 01 Jun 2018
Online Status: Offline
Posts: 2
Quote Kuneho Replybullet Topic: Subreport group summary to Main Report
    Posted: 05 Jun 2018 at 10:47am
Question: How to get the value of SubReport Summary Group to Main Report - Crystal Reports


I have a Subreport group by "Service" and create a Share NumberVar condition to get the average total of per Service.

Formula: WhilePrintingRecords; Shared NumberVar ServiceCO := ({#%Service}/2);

Note: {#%Service} - is running totals in Subreport place in Group Footer1 = Service

I need to refer the value of "ServiceCo" to the main report details with a condition depending if the service average from subreport is equal to main report service then I will get the value of "ServiceCO"

Currently, I was able to link the subreport properly in the main report and get the value but the problem I only get the value of Service#5 average (i.e. 9) but there are Service 1 to 4 with different value.

Can you please help me how to use Shared NumberVar in Main report to get the different value? or other solution please, if Shared NumberVar wont work

I also need the value of Spine = 13, Plastic =12 , etc.


Edited by Kuneho - 05 Jun 2018 at 10:50am
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 06 Jun 2018 at 4:37am
Okay,the only way to pass information to and from a subreport (exception is parameters that can be passed from the main report to a subreport), is to used shared variables.  So a shared variable only holds one value at a time (i.e., if the sub report is in a group footer, then the shared value can be set by the sub report when the report processes the group footer and thus when the group footer is processed again, then the shared variable will get a new value.).  I think you can pass a shared array (there are limits to arrays).

I hope this helps.
IP IP Logged
Kuneho
Newbie
Newbie


Joined: 01 Jun 2018
Online Status: Offline
Posts: 2
Quote Kuneho Replybullet Posted: 11 Jun 2018 at 4:22am
Thanks for the reply Kevlay
I would be grateful if you or somebody can help me do the coding? I'm not a programmer and not good a coding condition.
Can you please help me out.
Thanks so much
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.027 seconds.