Solved

Shared Variable will not reset

Posted on 2008-10-13
3
1,091 Views
Last Modified: 2012-08-13
I have a very urgent request. I have a shared variable that I'm pulling from a subreport into the main report. The problem is the variable never resets at the group level. It grabs the total for the first product but then just repeats that same total for all of my products.. HELP!

Subreport formula is

WhilePrintingRecords;
Shared NumberVar MyPPORequirements;
if(isnull({#RSum_Quantity_Fixed})) or ({#RSum_Quantity_Fixed} = 0) then MyPPORequirements := 0 else
MyPPORequirements := -{#RSum_Quantity_Fixed}

Main formula is
WhilePrintingRecords;
shared numbervar MyPPORequirements;
MyPPORequirements
0
Comment
Question by:boukaka
3 Comments
 
LVL 42

Accepted Solution

by:
zephyr_hex (Megan) earned 500 total points
ID: 22704595
i think you need to reset the variable by assigning 0 to it.  just create a new formula for this, and place it on the report at the point where the variable should reset.  make sure you have "whileprintingrecords" in that formula so it resets at the right time.
0
 

Author Comment

by:boukaka
ID: 22704627
That's working! Thank you for responding so quickly.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 22704639
Does the run ning total reset to 0?

I doubt it will ever be NULL

mlmcc
0

Featured Post

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

823 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question