LimeReport Forum
General Category | Основное => Discussion | Обсуждение => Topic started by: Kiko on July 14, 2017, 08:31:41 pm
-
The variable $V{#PAGE_COUNT} doesn't work on the script block $S{} ?
I used $V{#PAGE} and works fine but the $V{#PAGE_COUNT} gave me the error "SyntaxError: parse error".
-
Unfortunately, you can't use $V{#PAGE_COUNT} in script because it is a second pass variable and is not accessible in time when script is executing
-
Thank you for the quick answer, but my problem persist.
How to hide or show an item based on the current page ?
E. g If is the last page I have to hide the item, otherwise I have to show it in the other pages of my report.
-
Yes, I understand your problem and will try to find a solution
-
Could you elaborate on what type of objects do you want to hide on the last page?
-
The object is a Text Item.
-
Where are the items located ? May be on the pagefooter or pageheader? The problem is that in the first pass i don't know what page is rendered last or not, until the last page not finished. if i hide items on the second pass the band will not be resized
-
The item is located on the Page Footer band.
I'm using Qt 5.9.1 and my datasource is provided by data transfer and linking to a report generator by SIGNAL-SLOT approach.
Is it possible to create a parameter to force a 3rd pass where you could have access to the second pass variables in the script blocks or resize the bands ?
Wouldn't be possible to access the objects of my report before the preview/print ?
-
Can it be enough to hide pagefooter on last page ?
-
I can't hide the pagefooter because I'm using other items on it.
-
I have added new system variables (#IS_LAST_PAGEFOOTER & #IS_FIRST_PAGEFOOTER).
I hope it will usable for you.
-
Alex!
more usefull create variables #IS_LAST_PAGEFOOTER AND #IS_FIRST_PAGEHEADER I think :)
-
Hey Alex,
I downloaded the last version from GitHub.
Thank you for your modifications, will be very useful to me.
However the system variable #IS_FIRST_PAGEFOOTER is always returning false.
Can you fix it ?
This is the script that I'm using to test the version:
$S{
if($V{#IS_FIRST_PAGEFOOTER}){
"a"
}else{
"b"
}
}
-
I have fixed #IS_FIRST_PAGEFOOTER :)
Subst if you need #IS_FIRST_PAGEHEADER i can add it :)
-
#IS_FIRST_PAGEFOOTER works fine !
Thank you for adding these two variables, it helped me a lot.
-
You are welcome :)