How to use IsFirstPage - IsLastPage - TotalPageCount

Stimulsoft Ultimate discussion
Post Reply
yalisalar
Posts: 19
Joined: Tue Sep 22, 2020 4:51 am

How to use IsFirstPage - IsLastPage - TotalPageCount

Post by yalisalar »

Hi
I do not want "Text1" to be printed in single page reports. But be printed in multi-page reports.
I used the following code to do this
But I do not know why the result is not correct ?!

1:
if (TotalPageCount==1)
Text1.Enabled=false;

2:
if (IsFirstPage==true && IsLastPage==true)
Text1.Enabled=false;

The result of the above two codes is always FALSE !!!
Please guide me
yalisalar
Posts: 19
Joined: Tue Sep 22, 2020 4:51 am

Re: How to use IsFirstPage - IsLastPage - TotalPageCount

Post by yalisalar »

Do not print only one-page reports
Lech Kulikowski
Posts: 6237
Joined: Tue Mar 20, 2018 5:34 am

Re: How to use IsFirstPage - IsLastPage - TotalPageCount

Post by Lech Kulikowski »

Hello,

Please try to use the Condition with the "Component Is Enabled" option to hide Text component.
Also, you can set the PrintOn="Except First and Last Page" property.

Thank you.
yalisalar
Posts: 19
Joined: Tue Sep 22, 2020 4:51 am

Re: How to use IsFirstPage - IsLastPage - TotalPageCount

Post by yalisalar »

Hello ,
Thank you for your answer.

"Please try to use the Condition with the "Component Is Enabled" option to hide Text component."
Sorry, I do not understand what you mean.
You may explain the action with an example.


" Also, you can set the PrintOn="Except First and Last Page" property."
Unfortunately, I have tried this method before.
Only works properly on *1-page* reports!

For example, in a 4-page report, this is how it works :
PAGE 1 = NO! ------------- PAGE 2 = OK ------------- PAGE 3 = OK ------------- PAGE 4 = NO!

But I want it to be printed in 4-pages.
PAGE 1 = OK ------------- PAGE 2 = OK ------------- PAGE 3 = OK ------------- PAGE 4 = OK
yalisalar
Posts: 19
Joined: Tue Sep 22, 2020 4:51 am

Re: How to use IsFirstPage - IsLastPage - TotalPageCount

Post by yalisalar »

Excuse me, what is wrong with these codes?
They are logically correct.
But I do not know why they do not act ?!

1:
if (TotalPageCount==1)
Text1.Enabled=false;

2:
if (IsFirstPage==true && IsLastPage==true)
Text1.Enabled=false;
yalisalar
Posts: 19
Joined: Tue Sep 22, 2020 4:51 am

Re: How to use IsFirstPage - IsLastPage - TotalPageCount

Post by yalisalar »

"Text1" should not be printed in *1-page* reports only.
But in *multi-page* reports, it should be printed on all pages.
Lech Kulikowski
Posts: 6237
Joined: Tue Mar 20, 2018 5:34 am

Re: How to use IsFirstPage - IsLastPage - TotalPageCount

Post by Lech Kulikowski »

Hello,

Please send us a sample report with test data that reproduces the issue for analysis.

Thank you.
yalisalar
Posts: 19
Joined: Tue Sep 22, 2020 4:51 am

Re: How to use IsFirstPage - IsLastPage - TotalPageCount

Post by yalisalar »

Hello,

Thank you for your answer
Attachments
FACTOR000.mrt
(25.68 KiB) Downloaded 171 times
Lech Kulikowski
Posts: 6237
Joined: Tue Mar 20, 2018 5:34 am

Re: How to use IsFirstPage - IsLastPage - TotalPageCount

Post by Lech Kulikowski »

Hello,

Please send us your request on support@stimulsoft.com

Thank you.
Post Reply