Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Assign Sub Report value to Main Report Post Reply Post New Topic
Author Message
sunny73
Newbie
Newbie


Joined: 23 Oct 2009
Location: United States
Online Status: Offline
Posts: 8
Quote sunny73 Replybullet Topic: Assign Sub Report value to Main Report
    Posted: 09 Nov 2009 at 12:47pm

I have count of employees in subreport.  How can i call that value into main report?

I  tried with shared variables.
 
i have cerated a forumal in subreprot like
 
count ({employee.employee_id})
 
declared a shread variable
 
shared numberVar number := {@Count};
 
 
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 09 Nov 2009 at 3:11pm
Simply put a formula with the declared variable in it
i.e., shared numberVar number;
numbervar (if you just want to display the variable, use other code if you need to do something else with the number).
IP IP Logged
sunny73
Newbie
Newbie


Joined: 23 Oct 2009
Location: United States
Online Status: Offline
Posts: 8
Quote sunny73 Replybullet Posted: 10 Nov 2009 at 7:52am
I did same thing but i am getting '0' value in Main Report.
 
In subreport i am getting '2'.
IP IP Logged
alaub
Newbie
Newbie
Avatar

Joined: 10 Nov 2009
Online Status: Offline
Posts: 3
Quote alaub Replybullet Posted: 12 Nov 2009 at 5:07pm
I am having similar issues.
I have delared a shared variable in the subreport brought it forward into the main report but the variable is one entry behind.
 
So if the value in the subreport for Entry 1 is 'Yes' and then Entry two is 'No'
Then when it is shown in the Main report the first entry always shows up blank and the second entry displays 'Yes' and 'No' would be displayed for entry 3 etc.
 
I have yet to work out a solution to this problem.
 
The worst thing is if our developers created the database correctly I wouldn't need a subreport!
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.016 seconds.