Select Print Page 2 via WINFORM

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

Select Print Page 2 via WINFORM

Post by yalisalar »

Special greetings

I have designed two report pages. For example : PAGE1 = A4 and PAGE2 = A5

I want only one of them to be printed at the user's choice. via WINFORM

What should I do to do this?
What is the command code for this? --> Button OK

Select Page.jpg
Select Page.jpg (12.33 KiB) Viewed 2109 times
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Select Print Page 2 via WINFORM

Post by Lech Kulikowski »

Hello,

You can call the Print() method with the necessary printing setting in which set page number.

Or you can disable page in the report
report.Pages[index].Enabled = false;

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

Re: Select Print Page 2 via WINFORM

Post by yalisalar »

Hi

OK! Thank you very much for your good answer.

The problem was solved! → Pages1.Enabled = false;
yalisalar
Posts: 19
Joined: Tue Sep 22, 2020 4:51 am

Re: Select Print Page 2 via WINFORM

Post by yalisalar »

" You can call the Print() method with the necessary printing setting in which set page number. "

But I'm curious to know more about the print() method.

Can you explain this method as well? (with example)

Thank you
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Select Print Page 2 via WINFORM

Post by Lech Kulikowski »

Hello,

You can call Print() method from code with necessary settings:
StiReport report = new StiReport();
report.Load("");
report.Render(false);

PrinterSettings printSettings = new PrinterSettings();
printSettings.PrinterName = "";
printSettings.PrintRange = ;
report.Print(printSettings);

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

Re: Select Print Page 2 via WINFORM

Post by yalisalar »

Hello,

Thank you for your answer
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Select Print Page 2 via WINFORM

Post by HighAley »

Hello,

We are always glad to help you.

Thank you.
Post Reply