Solved

Shared Variable will not reset

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

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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. …
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

792 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