Symptom
- Variable lose its value
- Variable value reset to zero
- When paging through a report in Crystal Reports, the variable reset to zero, despite there is no formula that is set to reset its value.
Environment
- Crystal Reports 2008
Reproducing the Issue
- In Crystal Reports, create a report off any data source.
- Create a formula in whhich you declare a variable and assign a value to it. ( Variable – Assign Value )
WhilePrintingRecords;
NumberVar test := 777
- Create a formula to display the variable. ( Variable - Display )
WhilePrintingRecords;
NumberVar test
- Create a formula with a second variable. ( Variable - Calculation )
Whileprintingrecords;
NumbervVar x:=x+1
- Add 2 extra subsections to the Report Header section
- Insert the formulas in the following sections:
- “Variable – Assign Value” in the “Report Header –a” section
- “Variable – Display” in the “Report Header – b” section
- “Variable – Display” again in the “Report Header – c”, and in the “Report Footer” section
- “Variable – Calculation” in the “Page Footer” section
- Resize the Report Header A, B and to fill the first page so the Report Header C starts at the next page
- Preview the report and notice the variable value on page 2 is NULL, and the variable value equal zero in the Report Footer section.
Cause
- Variables are reset to zero when the Report Header is larger than a page, and there is a formula with a second variable in the Page Footer section.
- The issue has been identified and logged under Problem Report ID ADAPT01464111
Resolution
- The issue has been resolved in the following Crystal Reports 2008 updates:
- Fix Pack 2.10 and higher
- Fix Pack 3.3 and higher
Keywords
Crystal Reports, CR, variable , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem
Product
Crystal Reports 2008 V0 ; Crystal Reports 2008 V1