Topic: Passing data from sub to mainreport
Author
Message
Wouter1980
Newbie
Joined: 27 Mar 2013
Location: Netherlands
Online Status: Offline
Posts: 6
Topic: Passing data from sub to mainreport Posted: 27 Mar 2013 at 9:44pm
Hi,
Because of the database i had to make a subreport to get as summery i need in the detailsection of the main report.
I made two shared values and placed then in the detail section. In the subreports is everything correct.
All values but the first one is passing through correctly. The first one resluts 0,00 while it also should be 54.5.
Can someone explane why this is? and how i can get this fixed?
thanks
Verkoopnr
Omschrijving
PortieKg
RecNr
Recsub
GS1
Gewicht
Shared Value 1
46404
KALFSOESTER
0,545
12547
9943
200,00
0,00
MAIN
Why 0,00 and not like rest 54,50
RecNr
Inhoud receptuur
HoeveelHeid
Bruto gew
Netto
Shared Value
12547
9943
200,00
9,00
9,00
54,50
12547
8461
8,16
8,16
8,00
54,50
SUBREPORT
12547
8789
17,86
17,86
17,50
54,50
12547
15653
20,41
20,41
20,00
54,50
55,43
54,50
46404
KALFSOESTER
0,545
12547
8461
8,16
54,50
MAIN
RecNr
Inhoud receptuur
HoeveelHeid
Bruto gew
Netto
Shared Value
12547
9943
200,00
9,00
9,00
54,50
12547
8461
8,16
8,16
8,00
54,50
SUBREPORT
12547
8789
17,86
17,86
17,50
54,50
12547
15653
20,41
20,41
20,00
54,50
55,43
54,50
46404
KALFSOESTER
0,545
12547
8789
17,86
54,50
MAIN
RecNr
Inhoud receptuur
HoeveelHeid
Bruto gew
Netto
Shared Value
12547
9943
200,00
9,00
9,00
54,50
12547
8461
8,16
8,16
8,00
54,50
SUBREPORT
12547
8789
17,86
17,86
17,50
54,50
12547
15653
20,41
20,41
20,00
54,50
55,43
54,50
46404
KALFSOESTER
0,545
12547
15653
20,41
54,50
MAIN
RecNr
Inhoud receptuur
HoeveelHeid
Bruto gew
Netto
Shared Value
12547
9943
200,00
9,00
9,00
54,50
12547
8461
8,16
8,16
8,00
54,50
SUBREPORT
12547
8789
17,86
17,86
17,50
54,50
12547
15653
20,41
20,41
20,00
54,50
55,43
54,50
IP Logged
Gurbs
Senior Member
Joined: 16 Feb 2012
Location: Ireland
Online Status: Offline
Posts: 216
Posted: 28 Mar 2013 at 1:45am
Make sure the subreport runs before the place where u want to use the shared variable. If u put the subreport in details B, and the place where u want to use it in details A, it won't work.
IP Logged
Wouter1980
Newbie
Joined: 27 Mar 2013
Location: Netherlands
Online Status: Offline
Posts: 6
Posted: 29 Mar 2013 at 2:03am
Thnx for your feedback.
I did put the subreport in the same detail section as the shared value.
As you can see in the printscreen is the value show good in the subreport. receptuur 9943, 8461, 8789, 15653 gives all as shared value 54.50.
But it seems that the results of the shared value in the main report starts alway with a 0 and shift 1 line down.
So receptuur 9943 got 0 and then the other numbers got 54.50.
Do you understand why this is? And what i can do so i got the same results in the main report as in the subreport?
IP Logged
Wouter1980
Newbie
Joined: 27 Mar 2013
Location: Netherlands
Online Status: Offline
Posts: 6
Posted: 09 Apr 2013 at 11:30pm
Hi,
Is there someone who knows why the shared variable returns 0 for the first match?
In the subreport the shared value is a sum. Could that be the cause?
How i can solve it? Or shift the shared value 1 place up?
thnx
IP Logged
Wouter1980
Newbie
Joined: 27 Mar 2013
Location: Netherlands
Online Status: Offline
Posts: 6
Posted: 11 Apr 2013 at 4:23am
I tried a few things and found it .
When i put the subreport in the detail section A and the fields of the main report and the shared value in detail section B it works.
Probably because of the subreport evaluates so before the main report data.
IP Logged
Forum Jump
-- Select Forum --
Announcements
Talk with the Author
Self-Publishing
Job Postings
New feature request
Report Design
Data Connectivity
Technical Questions
Tips and Tricks
Crystal Xcelsius
Report Design
Data Connectivity
Writing Code
Tips and Tricks
Report Design
Data Connectivity
Writing Code
Tips and Tricks
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