Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Shared Variable starting at zero Post Reply Post New Topic
Author Message
GrisCorp
Groupie
Groupie
Avatar

Joined: 08 Mar 2013
Online Status: Offline
Posts: 64
Quote GrisCorp Replybullet Topic: Shared Variable starting at zero
     Posted: 23 Nov 2015 at 9:16am
I have a Shared Variable that passes a Count of the number of line items on an invoice from the subreport to the main report.

If I show the section in the subreport with the count, it displays the correct number when viewed in the main report.  However, when I place the formula for the Shared Variable in the Details section of the main report, the very first details sections displays a zero.  Then the second details section then shows the correct count for the first section, the third section shows the correct count for the second section, and so on.

When the group changes, the first Details section of the next group shows the correct count for the last Details section of the previous group.  Just the first Details of the first group gets the zero which then shifts the correct counts down by one for the rest of the report.

What am I doing wrong?


Edited by GrisCorp - 23 Nov 2015 at 9:19am
IP IP Logged
GrisCorp
Groupie
Groupie
Avatar

Joined: 08 Mar 2013
Online Status: Offline
Posts: 64
Quote GrisCorp Replybullet Posted: 23 Nov 2015 at 9:25am
I figured it out.  I had to create a second group in the Main report based on the Invoice number.  I then placed the subreport in that group headerand then the Shared Variable formula displayed the correct count.
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