Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Issue with setting and resetting a variable Post Reply Post New Topic
Author Message
lavadan
Newbie
Newbie


Joined: 08 Apr 2014
Online Status: Offline
Posts: 1
Quote lavadan Replybullet Topic: Issue with setting and resetting a variable
     Posted: 08 Apr 2014 at 8:54am
8 Apr 14 14:53
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?
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 09 Apr 2014 at 5:43am
there is no cache that I am aware of.

some things to think about:
1) Report footer, I wouldn't do anything there as the Page Header is already printed by that time, at least I think CR's logic is from the top of the page to the bottom, so it prints the page header and then continues on. It would print the report footer after it has already printed the page header...I've been wrong before.
2) The suppression formula can be simpified to:
variable1 <> 0

The big question is how do you know that you are on the last page...before you have started printing it?

I would guess that is where I would be looking...what is that logic, and where might it be going wrong.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum