Page 1 of 1

Force Default Style Collection on Report

Posted: Wed Oct 20, 2021 1:04 am
by DanielHewett
Hi,

We would like to be able to define a default style collection that could be loaded into the new report that is displayed when a user selects "New Report". This would then be applied to the components as the user places them on the page.

My understanding is that a style collection can only be applied to the components on the report when the user selects the Style collection and selects the "Yes" option of the "Do you want to apply style collection to report components?" modal?

Would you be able to advise if it is possible and if so, the best way to do the following:
1. Load a style collection into a new report programmatically.
2. Automatically apply a style collection to components as a user adds them to the report.

Thanks

Re: Force Default Style Collection on Report

Posted: Thu Oct 21, 2021 2:26 pm
by HighAley
Hello,

StiStylesCollection has several Load() methods that can help you.
You could load the style collection from file or stream.

Unfortunately, there is no way to apply the styles automatically.

Thank you.