Property Events can't be loaded, edited nor saved

Stimulsoft Reports.JS discussion
PoiSoNz
Posts: 6
Joined: Thu Oct 15, 2020 11:25 am

Property Events can't be loaded, edited nor saved

Post by PoiSoNz »

The attached report (LotTraveller) XML file contains a "BeginRender" event defined.

Image

When the report is loaded in Silverlight (Image above), the event is correctly displayed in the interface. However, when loaded in an HTML5 project, the the BeginRender event field is empty.

All other variables are correctly loaded, except for events.

After further debugging, I noticed that the "designer.report.beginRenderEvent" object was empty after manually setting the BeginRenderEvent field directly through the interface. And vice-versa, also tried to set the "designer.report.beginRenderEvent.script" programmatically and the field remained empty in the interface.

Version being used:
Version: 2018.2.3
Build date: 2018.07.05
Attachments
LotTraveler .xml
(16.38 KiB) Downloaded 200 times
Lech Kulikowski
Posts: 7293
Joined: Tue Mar 20, 2018 5:34 am

Re: Property Events can't be loaded, edited nor saved

Post by Lech Kulikowski »

Hello,

In the Silverlight version, is use C# language for code in events.
Events in the JS version are limited and use their own script language.

Thank you.
PoiSoNz
Posts: 6
Joined: Thu Oct 15, 2020 11:25 am

Re: Property Events can't be loaded, edited nor saved

Post by PoiSoNz »

Where can I find documentation for the script language?
Lech Kulikowski
Posts: 7293
Joined: Tue Mar 20, 2018 5:34 am

Re: Property Events can't be loaded, edited nor saved

Post by Lech Kulikowski »

Hello,

Unfortunately, there is no such documentation.

Thank you.
PoiSoNz
Posts: 6
Joined: Thu Oct 15, 2020 11:25 am

Re: Property Events can't be loaded, edited nor saved

Post by PoiSoNz »

Does that mean I won't be able to use the event feature in the JS interface?
Lech Kulikowski
Posts: 7293
Joined: Tue Mar 20, 2018 5:34 am

Re: Property Events can't be loaded, edited nor saved

Post by Lech Kulikowski »

Hello,

You can use code in events but it has some limitations in comparison with NET engine.

Thank you.
PoiSoNz
Posts: 6
Joined: Thu Oct 15, 2020 11:25 am

Re: Property Events can't be loaded, edited nor saved

Post by PoiSoNz »

I've tried different scripts and none of them worked. Can you give an example script just to test if it can be saved and loaded?
Lech Kulikowski
Posts: 7293
Joined: Tue Mar 20, 2018 5:34 am

Re: Property Events can't be loaded, edited nor saved

Post by Lech Kulikowski »

Hello,

Which task do you need to do in the events?

Thank you.
PoiSoNz
Posts: 6
Joined: Thu Oct 15, 2020 11:25 am

Re: Property Events can't be loaded, edited nor saved

Post by PoiSoNz »

In the example report I sent you (Silverlight), the event was:

Code: Select all

Shape1.Brush = new StiSolidBrush();
, how can I do that in the JS version?

And how can I change font colors, also?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Property Events can't be loaded, edited nor saved

Post by HighAley »

Hello,

Yes, you could use code like this:

Shape1.brush = new Stimulsoft.Base.Drawing.StiSolidBrush(Stimulsoft.System.Drawing.ColorTranslator.fromHtml(sampleData.getData("color")));

Thank you.
Post Reply