Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

resetting amount from subreport when null 2

Status
Not open for further replies.

suburbanites

Programmer
Aug 16, 2007
75
US
Hi, I am using CRXI SP1

I have a subreport and I am bringing an amount back to the main report. The amount does show in the main report. However, my problem is that if the amount coming from the subreport is null(zero) the amount still carries the value from the previous record read and is not resetting itself. I created a reset field which has the following:

WhilePrintingRecords;
Shared NumberVar totbudperfr := 0;

and I placed this reset field in the report header and the group footer. It's not working. Am I missing some other step to reflect null values?

Thanks for your input on this perplexing situation.
 
You could try zeroing it in the subreport header rather than the main report.

The reason why you aren't getting a change is that the subreport isn't finding any records, so the formula doesn't run in the subreport (since presumably it is in the detail section of the subreport).

At least that's my guess.
 
Where is your subreport located? The reset formula should be in a section in the main report before the sub executes (e.g, in GH_a if the sub is in GH_b) or in the report header and in a section after the shared variable is referenced.

-LB
 
Thanks so much to boh of you. I had it after the sub executes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top