Hi,
I want to know how to load the custom style (.sts) file and apply it to the report designer's ''select style'' section using javascript.
in some post, you mentioned about the we can do it by some methods like,
loadFromJsonObject(jObject: StiJson)
loadFromXml(xmlNode: XmlNode)
but couldn't find any methods in JS documentation section.
https://admin.stimulsoft.com/documentat ... eport.html
Appreciate, if you could give some code examples of how we can achieve this using JavaScript.
thank you.
Regards,
damith
Loading Custom Styles(.sts) in runtime
-
- Posts: 6199
- Joined: Tue Mar 20, 2018 5:34 am
Re: Loading Custom Styles(.sts) in runtime
Hello,
You can save the necessary styles in JSON, XML and then use these methods to load it.
Thank you.
You can save the necessary styles in JSON, XML and then use these methods to load it.
Thank you.
Re: Loading Custom Styles(.sts) in runtime
Hi Lech,
Thanks for the Reply.
Seems you didn't get me right.
Yeah, I got the style from JSON but I couldn't find any load methods in StiReport class in Javascript documentation.
something like report.style.loadFromJsonObject(JSON).
i can see mentioned methods(loadFromJsonObject(jObject: StiJson),loadFromXml(xmlNode: XmlNode)) in StiStyleCondition class. Please refer below link.
(https://admin.stimulsoft.com/documentat ... ition.html )
but I couldn't find any class or method for StiStylesCollection in Javascript documentation.
An early reply would be appreciated.
Thank you.
Regards,
damith
Thanks for the Reply.
Seems you didn't get me right.
Yeah, I got the style from JSON but I couldn't find any load methods in StiReport class in Javascript documentation.
something like report.style.loadFromJsonObject(JSON).
i can see mentioned methods(loadFromJsonObject(jObject: StiJson),loadFromXml(xmlNode: XmlNode)) in StiStyleCondition class. Please refer below link.
(https://admin.stimulsoft.com/documentat ... ition.html )
but I couldn't find any class or method for StiStylesCollection in Javascript documentation.
An early reply would be appreciated.
Thank you.
Regards,
damith
-
- Posts: 6199
- Joined: Tue Mar 20, 2018 5:34 am
Re: Loading Custom Styles(.sts) in runtime
Hello,
You can use the following methods:
report.styles.loadFile("Styles.sts");
report.styles.loadFromJsonObject(jObject: StiJson)
report.styles.loadFromXml(xmlNode: XmlNode)
etc
Thank you.
You can use the following methods:
report.styles.loadFile("Styles.sts");
report.styles.loadFromJsonObject(jObject: StiJson)
report.styles.loadFromXml(xmlNode: XmlNode)
etc
Thank you.
Re: Loading Custom Styles(.sts) in runtime
Hi Lech,
Thanks for the reply.
Regards,
damith.
Thanks for the reply.
Regards,
damith.
-
- Posts: 6199
- Joined: Tue Mar 20, 2018 5:34 am
Re: Loading Custom Styles(.sts) in runtime
Hello,
You are welcome.
You are welcome.