How to select/query rendered pages

Stimulsoft Reports.NET discussion
Post Reply
Dimitris Laliotis
Posts: 3
Joined: Fri Feb 03, 2023 7:23 pm

How to select/query rendered pages

Post by Dimitris Laliotis »

On a windows application I have received a (rendered) report from my Server, I need to send the report (as pdf) for printing, some pages have to be sent to one printer and others to an other. The criteria of what page is sent to what printer is to be decided according to the data row (from dataSource) that created the page.

I need a way to read a custom variable set per page or read the DataRow that created the page. If I can distinct those pages I can then create a new StiReport and send it for printing. I have control of both client and server application. Please advise

P.S.1: printing process is a custom implementation stimulsoft's printing will not be used
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: How to select/query rendered pages

Post by Lech Kulikowski »

Hello,

As a way, you can use the ExcelSheet property of the page to store the printer state for the page.
And then for the rendered report check all rendered pages and combine them in different instances and print it's as you need.

Thank you.
Dimitris Laliotis
Posts: 3
Joined: Fri Feb 03, 2023 7:23 pm

Re: How to select/query rendered pages

Post by Dimitris Laliotis »

Thanks for the answer, I've tried your suggestion and could serve my purpose.

I was able to set page.ExcelSheet.Value = "some_value" since it is a string. Can I put something more complex? Like a DataRow or a key-value type variable
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: How to select/query rendered pages

Post by Lech Kulikowski »

Hello,

Yes, you can use an expression for the ExcelSheet property.

Thank you.
Dimitris Laliotis
Posts: 3
Joined: Fri Feb 03, 2023 7:23 pm

Re: How to select/query rendered pages

Post by Dimitris Laliotis »

Can you give me an example?

Lets say I have two custom fields I want to store in page.ExcelSheet.Value -> int myCustomId = 55 and string myCustomDescription = "some_value"

Thank you in advance
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: How to select/query rendered pages

Post by Lech Kulikowski »

Hello,

Sorry, maybe we did not exactly understand your question. You can set the expression:
{myCustomId}{myCustomDescription}

Thank you.
Post Reply