In the details I've a field that must be checked with this formula
WhilePrintingRecords;
if instr ({stdoc_righe.rig_parte},"S6")>0 then
BooleanVar flg_stampa_piede_s6:=true;
flg_stampa_piede_s6
So if in the field there's "S6" word the variable change to true.
And it works fine. I've put the field in the details and the true appear.
In the report footer I've another field with suppress code in this way
BooleanVar flg_stampa_piede_s6;
if flg_stampa_piede_s6 = true then false else true;
So if the variable is true (and the word is in the report) then print it.
Unfortunately it seems not working. After some try I've tried to check the variable value and appears that in the page footer is false. So it seems that for some reason the variable doesn't remain in the same state of the details.
Am I doing something wrong?
Thanks for answers
[IMG]smileys/smiley1.gif" align="middle" />
EDIT
After many test it seems that it takes the last row without considering the remaining.
The strange part is that I put visible the variable in the details and at the same time in the report footer and obtain that thing
blabla [false]
blablas6 [true]
blabla [true] *correct because when the variable change doesn't change anymore
variable in the page footer.... [false]!!!
It seems that is considering only the last row despite the value in the last row is true.
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Posted: 13 Jun 2013 at 5:17am
One, I never have good luck with my variables to default as global. If I want the variable to keep it's value. I set my variables to be shared (i.e, Shared BooleanVar flg_stampa_piede_s6;). Secondarily, just because I am an old programmer. I always define my variables at the beginning of the code (shouldn't matter though).
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