Print Page | Close Window

Zero out Subtotal FIeld After

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=5241
Printed Date: 18 May 2024 at 9:11pm


Topic: Zero out Subtotal FIeld After
Posted By: HolyCow
Subject: Zero out Subtotal FIeld After
Date Posted: 16 Jan 2009 at 8:34am
I have a subtotal field in a subreport that is being passed to the main report and added to another subtotal field from a second subreport.  How do you zero out the subtotal field once its been "Shared"?  The problem I am having is it "remembers" the value that was in the field so when I get a blank section, it passes the value that was in the filed before the blank section came along.  Help, PLEASE.



Replies:
Posted By: lockwelle
Date Posted: 19 Jan 2009 at 6:41am
You will need to decide where you want it to be 'Reset', but once you know that, the rest is a piece of cake.
 
Create a formula that sets your shared variable to 0, like:
shared numbervar aVar :=0;
""       // I put this here so that nothing displays on the report.
 
Now just drag the formula onto the report where you want the variable reset.
 
Hope this helps
 


Posted By: HolyCow
Date Posted: 19 Jan 2009 at 6:45am

Thanks, it did indeed help much.  I figured that it had to go after the catpture of the variable, after a bit of moving and testing.  Thanks.  ;)




Print Page | Close Window