Page 1 of 2

Property Events can't be loaded, edited nor saved

Posted: Thu Oct 15, 2020 11:43 am
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

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

Posted: Thu Oct 15, 2020 10:03 pm
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.

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

Posted: Fri Oct 16, 2020 9:13 am
by PoiSoNz
Where can I find documentation for the script language?

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

Posted: Mon Oct 19, 2020 1:57 pm
by Lech Kulikowski
Hello,

Unfortunately, there is no such documentation.

Thank you.

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

Posted: Mon Oct 19, 2020 3:17 pm
by PoiSoNz
Does that mean I won't be able to use the event feature in the JS interface?

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

Posted: Wed Oct 21, 2020 8:50 pm
by Lech Kulikowski
Hello,

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

Thank you.

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

Posted: Tue Oct 27, 2020 9:35 am
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?

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

Posted: Fri Oct 30, 2020 8:03 am
by Lech Kulikowski
Hello,

Which task do you need to do in the events?

Thank you.

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

Posted: Mon Nov 02, 2020 9:58 am
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?

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

Posted: Mon Nov 09, 2020 9:32 pm
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.