Solved

Shared Variable will not reset

Posted on 2008-10-13
3
1,089 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 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

747 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now