Report template events in designer

Stimulsoft Reports.WEB discussion
Post Reply
FrenkR
Posts: 131
Joined: Mon Jan 05, 2015 12:15 am

Report template events in designer

Post by FrenkR »

Hello,
is there any explanation on how are component events implemented in HTML5 designer? Event handler editors are visible in designer, but I can't find any docs/examples on how to use them:
gettag.png
gettag.png (14.73 KiB) Viewed 2937 times
For each printed page, I would like to set expression that would set rendered page "TagValue" with data from arbitrary data from dictionary.

using latest 2019.1 version.

Thank you.
Rgds,
Frenk
Lech Kulikowski
Posts: 6263
Joined: Tue Mar 20, 2018 5:34 am

Re: Report template events in designer

Post by Lech Kulikowski »

Hello,

There is no documentation about reports events. Also, not all products supported it.

In Web, events will work only on the server side.

Thank you.
FrenkR
Posts: 131
Joined: Mon Jan 05, 2015 12:15 am

Re: Report template events in designer

Post by FrenkR »

Hello,
that is an exelent news, that they works on server side. My scenario is as follows. On each rendered page, I would like to set TagValue (from dataset/variables). Then, in report.RenderedPages array, I would like to read value on each rendered page. Can you please give me a hint on how to use Get Tag event on page to assign value? Simple demo case would help a lot. Thank you.
Rgds,
Frenk
Lech Kulikowski
Posts: 6263
Joined: Tue Mar 20, 2018 5:34 am

Re: Report template events in designer

Post by Lech Kulikowski »

Hello,

As a way, you can use DoublePass mode for the report where in the first pass save necessary values and in second check it.

Thank you.
FrenkR
Posts: 131
Joined: Mon Jan 05, 2015 12:15 am

Re: Report template events in designer

Post by FrenkR »

Lech,
I am trying to set page tag value inside "Get Tag" Value events as shown in a picture. Can you please help with a simple example how to do that?
Lech Kulikowski
Posts: 6263
Joined: Tue Mar 20, 2018 5:34 am

Re: Report template events in designer

Post by Lech Kulikowski »

Hello,

Could you explain your task in more details?

Thank you.
FrenkR
Posts: 131
Joined: Mon Jan 05, 2015 12:15 am

Re: Report template events in designer

Post by FrenkR »

Hello, when page redenred/printed, I would like to fill TagValue with some values from dataset/report labels. These values will be then read in Report.RenderedPages list.
I thought event "Get Tag" is proper location to fill proposed value.
Rgds,
Frenk
Lech Kulikowski
Posts: 6263
Joined: Tue Mar 20, 2018 5:34 am

Re: Report template events in designer

Post by Lech Kulikowski »

Hello,

You can use the BeforePrint event for the Page.

Thank you.
FrenkR
Posts: 131
Joined: Mon Jan 05, 2015 12:15 am

Re: Report template events in designer

Post by FrenkR »

Lech,
can you please provide me an example of script of most trivial script, e.g. TagValue = "aaa" ?
I was trying to use events, but it seems that are totally ignored. Is there any property to enable events?

In which case is event "Tag Value" actually triggered? What are event parameters?
Lech Kulikowski
Posts: 6263
Joined: Tue Mar 20, 2018 5:34 am

Re: Report template events in designer

Post by Lech Kulikowski »

Hello,

> I would like to fill TagValue with some values from dataset/report labels. These values will be then read in Report.RenderedPages list.

You can try to use ExcelSheet property for this task. Also, you can set this property without events.

> In which case is event "Tag Value" actually triggered? What are event parameters?

Interaction - Tag property.

Thank you.
Post Reply