Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Shared Variable in Subreport Post Reply Post New Topic
Author Message
mohdssiraj20
Newbie
Newbie


Joined: 24 Dec 2009
Location: India
Online Status: Offline
Posts: 5
Quote mohdssiraj20 Replybullet Topic: Shared Variable in Subreport
     Posted: 29 Dec 2009 at 9:07pm
Hi,
 
I have a requirement like this
 
My Report Structure
 
MAIN REPORT
-------------------------------------------------------------------------------------------
Col1        Col2         Col3       SubRpt1             SubRpt2               SubRpt3
 
I have one shared variable in Main Report
 
shared numbervar COUNTER;
 
I want to do some manipulation on COUNTER variable in
 
SupRpt1-->SupRpt2-->SupRpt3 [HERE SEQUENCE IS IMP]
 
I want to process my COUNTER vairable sequenctially through SubRpt1 to SubRpt3.
 
And Final result I want to display in SubRpt3
 
But here my problem, iam not able to control the sequence of Execution for COUNTER Variable in subreports.
 
It's getting randomly executed.
 
First it is excuting in SupRpt3 then SupRpt1 And in the End SupRpt2.
 
I want to control it's sequence or any other solution to acheive the desired functionality
 
Thanks
Siraj
 
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 30 Dec 2009 at 6:13am
if the subreports are basically returning a row of data, you could store the rows value in variables. By doing so, you could put each subreport in its own detail section and so control the execution order.
 
But if the reports return more than 1 row of data, this won't work.  If they return many columns, it will work, but it will be a pain to maintain.
 
HTH
IP IP Logged
mohdssiraj20
Newbie
Newbie


Joined: 24 Dec 2009
Location: India
Online Status: Offline
Posts: 5
Quote mohdssiraj20 Replybullet Posted: 30 Dec 2009 at 6:55am
Thanks for the reply
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