Page 1 of 1

Component Styles for change an image

Posted: Tue Nov 10, 2020 8:51 am
by vorauler
Hi

Is it possible with help from the component style to change an image. We have some cumstomers that need their corporate design, which differs in font and image. For that we have created different style files that we load at runtime.

Code: Select all

report.Styles.Load("DefaultStyle.sts");
For fonts it`s perfekt, but it`s possible for images?

TIA
Ralf

Re: Component Styles for change an image

Posted: Tue Nov 10, 2020 9:33 pm
by HighAley
Hello, Ralf.

There is no way to set the images from the style.
You could use the Resources for this, Just update an image in the resources and get it from there.

Thank you.

Re: Component Styles for change an image

Posted: Wed Nov 11, 2020 7:00 am
by MatthiasU
Hi,

yes, this should be possible. But maybe you have to call ApplyStyles() method of reports after loading the style sheet. Or you have to call the SetStyleToComponent(StiComponent comp) method of the style. Please try.

But be aware of the image size limitation when you use images in styles (maximum string lenght).

Regards,
Matthias

Re: Component Styles for change an image

Posted: Thu Nov 12, 2020 7:28 am
by vorauler
Ok, thanks for your answers.
Ralf

Re: Component Styles for change an image

Posted: Mon Nov 16, 2020 9:04 am
by Lech Kulikowski
Hello,

Thank you for the additional information.