Clearing a variable from a sub report Crystal reports

5 pts.
Tags:
Crystal Reports Subreport
Crystal Reports XI
I am using a sub report to update a report using a different file.  I am using shared variables.  If there is no hit in the second file, the sub report does not print, but my shared variables do not clear and appear as the one before instead of zero.  I keep reading that I have to initialise the variable in the header record.  Using the Report Wizard, how do I do that?  Thank you.

Software/Hardware used:
Crysrtal Reports XI

Answer Wiki

Thanks. We'll let you know when a new response is added.

When you declare your variable set it to null, 0 or “” for a string date(0,0,0) for a date. If you need it to reset everytime, you can create a variable set to null (or whatever) and place that formula in the header. Then create a second formula, which uses the variable created in the header formula, and perform all math in the details section.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following