Initializing/resetting subreport and shared values

5 pts.
Tags:
Crystal Reports
Crystal Reports 8.5
Crystal Reports Subreports
Initlialize Shared Fields
Subreports
In CR 8.5, I am passing a subreport value to the main report, then using the subreport field value in the main report.  (I have the calculation in the step [em]below[/em] the step that is returing the sub-report value.)   My issue is that once the subreport value gets populated with a non-zero value, it populates the shared field in the step [em]below[/em] the step that returns the value from the subreport but does not reset/initialize back to 0 or null once that record has been processed. It maintains that value in the shared main report field and calculation until the next non-zero value in the subreport.  I have placed an initialization formula into multiple steps in the main report and in the first step of the subreport,  testing for a location that will reset the shared field.

Example:

[strong]Record1[/strong]: Main report: Score1 = 755, Subreport Score2 = 822, Shared field Score2 in Main Report = 822, Calculation: If Score1 > Score 2,then Score1, else Score2.

[strong]Record2[/strong]:  Main Report:  Score1 692, Subreport Score2 = 0/Null, Shared field Score2 in Main Report = [strong]822[/strong].  Did [em]NOT[/em] pull back 0/Null for Score2.

Should I have to initialize?  If so, where?

Thanks!!

 

 

 

 



Software/Hardware used:
Crystal Reports 8.5

Answer Wiki

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

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