Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Subreport - total from 2 or more Post Reply Post New Topic
Author Message
hmatyas
Newbie
Newbie


Joined: 23 Jan 2008
Location: United States
Online Status: Offline
Posts: 6
Quote hmatyas Replybullet Topic: Subreport - total from 2 or more
     Posted: 18 Feb 2008 at 7:45pm
I am working on a bill that is a series of subreports.  Most of the tables have an override field.  For example FlowCost, FlowOverride, SewerCost, SewerOverride.  The first person that wrote the report did not take into account the override fields.  So my problem is that I have a report that I'm using uses NVL (FlowOverride,flowCost).  and I can sum all of the cost for one subreport.  The problem is that there are more number that I need and then be able to sum them all up into a grand total. 
 
First subreport              vvvvvv          vvvvvvvv       vvvvvvv
                                      xxxxx           xxxxxxx         xxxxxx
                                      YYYYY           YYYYYYY         YYYYYYY
 Total                             ZZZZZ          ZZZZZZ         ZZZZZZZ
 
Second subreport        aaaaaa          aaaaaa         aaaaaaa
                                    bbbbbb          bbbbbb         bbbbbbb
                                    cccccccc          cccccccc         ccccccccc
 
Total                             dddddd          ddddddd       ddddddd
 
Grand Total                    FFFFFF          FFFFFFFF        FFFFFFFF
 
 Thank you.
 
                         
Harvey
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 19 Feb 2008 at 10:28pm
If you need to bring totals from the subreport into the main report, then you need to create a formula in each subreport that creates a Global variable for each total that needs to be carried forward. In the subreport, assign each total value to the appropriate global variable and then in the main report create a formula which uses those global variables in the calculation of the overall grand total.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
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