Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Returning values from a sub report Post Reply Post New Topic
Author Message
Bullet
Newbie
Newbie
Avatar

Joined: 25 Apr 2008
Location: United Kingdom
Online Status: Offline
Posts: 5
Quote Bullet Replybullet Topic: Returning values from a sub report
    Posted: 25 Apr 2008 at 4:35am

I need to return a value on a sub report on to my main report so that I can calculate a total, i've got as far as returning it to the report but it seems to do the calculation on the previous record rather than the record it should be on so it does something a like

1+2 = 0
4+2 = 3
5+7 = 6 etc...........
 
I'm guessing that it's something to do with the pass sequence when processing the formulas but I'm using shared variables to return the value and you only have the option of using "whileprintingrecords" pass.
 
Is there a better way of returning Sub Report values back to a main report?
 
the formula on my sub report is as follows
 
whileprintingrecords;
shared numbervar stocktotal := (this value is a formula)
 
 
the formula on my main report is as follows
 
whileprintingrecords;
shared numbervar stocktotal


Edited by Bullet - 25 Apr 2008 at 6:01am
IP IP Logged
Bullet
Newbie
Newbie
Avatar

Joined: 25 Apr 2008
Location: United Kingdom
Online Status: Offline
Posts: 5
Quote Bullet Replybullet Posted: 29 Apr 2008 at 3:39am

You need to create a group in your main report and move your shared variable into the group footer



Edited by Bullet - 29 Apr 2008 at 3:40am
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.031 seconds.