Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Display total of Subreport in Main report? Post Reply Post New Topic
Author Message
jbalbo
Senior Member
Senior Member
Avatar

Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Quote jbalbo Replybullet Topic: Display total of Subreport in Main report?
    Posted: 16 Sep 2011 at 5:50am
Hi,
 
Does anyone know if I can display a total of a subreport value on the main report?
So, the subreport shows an adjusted value and is displayed in the details section on the mian report, I group by location and in the group footer I want to display the Sum of the adjusted values
BTW: I am using Crystal 2008
 
Thanks In Advanve
Joe
 
IP IP Logged
Stang67
Newbie
Newbie
Avatar

Joined: 14 Apr 2011
Online Status: Offline
Posts: 12
Quote Stang67 Replybullet Posted: 19 Sep 2011 at 5:22am
Hi Joe,

for this you can use shared variables :)
Here i have a little example for you (uses the taxes from sub to main) report.

Example: Use Data from sub-report in the main-report

(for the other way, you assign the variable in the main-report like the example-code)

-          add a new formula field in the sub-report (called taxnumber)

-          fill it with:

Shared STRINGVAR TAXNUMBER := {Taxes.TaxNumber}

TAXNUMBER is the variable name

:= is the assignment

then click on “save and close”

 

-          Go to the main-report

-          add a new formula field (called taxnumber, there is no problem with the same name)

-          fill it with:

Shared STRINGVAR TAXNUMBER;

IF TAXNUMBER > ' '

THEN TAXNUMBER

ELSE ' - '

-          place the formula field where do you like




best regards
mike


Edited by Stang67 - 19 Sep 2011 at 5:23am
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.035 seconds.