1
votes

I have the below report structure

Report Header- Variable set to 0 Page Header- Section supressed if variable is 1(which means suppress on last page suppression formula is

WhilePrintingRecords;
numberVar variable1;
if variable1=0 then
FALSE
else
TRUE;

Report footer- variable set to 1

Now the fun is on one of the user machines, the Page header gets suppressed on all pages. If we refresh, then the page header gets displayed. It happens randomly and I am not able to research as the page header gets displayed properly once I start playing with the report.

I can put a simple fix to ignore the variables and suppress the page header contents on the last page but I want to know what is causing this issue. Is there a cache for the variable setting that is causing this confusion?

1
Are your Report Header and Report Footer formulas also using the WhilePrintingRecords keyword? If not, you're going to see this unpredictable sequence of formula evaluations.Ryan
Yes. I am using whileprintingrecords for setting and reseting formula. The Variable setting at RH is WhilePrintingRecords numberVar Variable:=0; The variable setting at RF is WhilePrintingRecords numberVar Variable:=1;user3411162
You must have something else going on then...possibly using that variable in another formula? I just tested this scenario and it behaved predictably, that is, it never suppressed any of the pages headers regardless of refreshing the report. Does this happen on the dev machine?Ryan
This report is printed only from production machine and it has different settings than mine. Another problem is I am not even able to reproduce this from my machine unless I move the Report footer variable to Page Header.user3411162

1 Answers

-1
votes

Yes Dear,

This is definately happened, because of your condition.

numberVar variable1;
if variable1=0 then

This give one time true and second time false. Good to use a database variable or create a variable, give formula as below and, put in to detail section. And use this variable into here.

var i = WhilePrintingRecords;

(this is not exact, but for your understanding, just check links)

Before you start or doing something, just read these links:

How does whileprintingrecords in Crystal Reports translate to SQL

http://pic.dhe.ibm.com/infocenter/rsawshlp/v7r5m0/index.jsp?topic=%2Fcom.businessobjects.integration.eclipse.designer.doc%2Fhtml%2Ftopic738.html

http://www.infragistics.com/community/forums/t/64879.aspx