Problem using IsLastPage and ResetPageNumber

Stimulsoft Ultimate discussion
Post Reply
Alvaro
Posts: 3
Joined: Mon Aug 17, 2015 12:10 pm

Problem using IsLastPage and ResetPageNumber

Post by Alvaro »

Hello,

I have a report where I need different page headers and footers depending on the page number. I had no problems until I use ResetPageNumber because I need to print muliple reports at the same time, then the condition with IsLastPage is only working the first time, I mean, it's like once the variable is set to true it is never reset.
With the headers I've used IsFirstPage variable and it works well, but in the footers I tried everything with IsLastPage and still not working...
Any idea?
Thanks.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Problem using IsLastPage and ResetPageNumber

Post by HighAley »

Hello.

At the rendering time each page is the last.
It seems that you check the IsLastPage while report is rendered. At this moment there is no other pages and the current page is the last.
You could set the Number of Pass to the Double Pass or maybe there is an other solution of your issue.
Could you describe your issue more detailed. Why do you use IsLastPage variable?

Thank you.
Alvaro
Posts: 3
Joined: Mon Aug 17, 2015 12:10 pm

Re: Problem using IsLastPage and ResetPageNumber

Post by Alvaro »

I set Double Pass and the problem is the same.
I need to show the next page number in the bottom of the page, it must be shown in all the pages except the last one. I tried with PrintOn Except last page but when I set a ResetPegeNumber this also stop working. I tried to make some conditions like (if TotalPAgeCount == PageNumber) but it's not working either.
There is an option to force to the system to evaluate a formula after the rendering??
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Problem using IsLastPage and ResetPageNumber

Post by HighAley »

Hello.

You should use next expression

Code: Select all

PageNumberThrough == TotalPageCountThrough
and set the Number of Pass property of the report to Double Pass.
Please, look at the attached report template.

Thank you.
Attachments
Report.mrt
(21.05 KiB) Downloaded 234 times
Alvaro
Posts: 3
Joined: Mon Aug 17, 2015 12:10 pm

Re: Problem using IsLastPage and ResetPageNumber

Post by Alvaro »

Hello,

Still the same problem...
My report has 4 pages and the page numbers are: 1,2,1,2
I need to show the next page number so I've added a variable like this "PageNumber + 1", I need this: 2,(blank),2,(blank)
With your soultion i get: 2,3,(blank),(blank)
And using this formula "PageNumber == TotalPageCount" I get this: 2,(blank),(blank),(blank)

I'm using version 2013.2.1604, I don't know if something is fixed about this in the latest versions.
Thanks.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Problem using IsLastPage and ResetPageNumber

Post by HighAley »

Hello.

Did you set the Number of Pass property of the report to Double Pass?
Please, try also our latest build and let us know about results.

Thank you.
Post Reply