Component Styles for change an image

Stimulsoft Reports.NET discussion
Post Reply
vorauler
Posts: 71
Joined: Wed Jul 15, 2009 1:20 am

Component Styles for change an image

Post 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
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Component Styles for change an image

Post 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.
MatthiasU
Posts: 68
Joined: Mon Sep 14, 2015 8:33 am

Re: Component Styles for change an image

Post 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
vorauler
Posts: 71
Joined: Wed Jul 15, 2009 1:20 am

Re: Component Styles for change an image

Post by vorauler »

Ok, thanks for your answers.
Ralf
Lech Kulikowski
Posts: 6266
Joined: Tue Mar 20, 2018 5:34 am

Re: Component Styles for change an image

Post by Lech Kulikowski »

Hello,

Thank you for the additional information.
Post Reply