Image as variable in Silverlight - not displaying
Image as variable in Silverlight - not displaying
Hi
I am about to deploy my application with Stimulsoft reports. The company I work for is about to purchase licenses for the Silverlight controls (we already have licenses for WPF.) So this is an exciting week!
I have been asked to place a image in one of the reports. The source is a Uri. A variable has been set in the report template. I read on a different thread that the SIlverlight viewer cannot use the URL directly so I am creating a BitmapImage in codebehind.
I am able to use this BitmapImage in the xaml file, but it does not get displayed in the report. A sample project is attached. Your help is much appreciated.
I am about to deploy my application with Stimulsoft reports. The company I work for is about to purchase licenses for the Silverlight controls (we already have licenses for WPF.) So this is an exciting week!
I have been asked to place a image in one of the reports. The source is a Uri. A variable has been set in the report template. I read on a different thread that the SIlverlight viewer cannot use the URL directly so I am creating a BitmapImage in codebehind.
I am able to use this BitmapImage in the xaml file, but it does not get displayed in the report. A sample project is attached. Your help is much appreciated.
- Attachments
-
- StimulsoftImageTest.zip
- (7.61 MiB) Downloaded 569 times
Re: Image as variable in Silverlight - not displaying
Does anyone have any input on this? I'd really appreciate some help on this issue.
Re: Image as variable in Silverlight - not displaying
Hello.
Unfortunately, due to Silverlight restrictions it's impossible to load data from file.
There is no data in the BitmapImage and you could get it neither from local file nor from remote host.
Thank you.
Unfortunately, due to Silverlight restrictions it's impossible to load data from file.
There is no data in the BitmapImage and you could get it neither from local file nor from remote host.
Thank you.
Re: Image as variable in Silverlight - not displaying
Thank you for the reply. What do you mean when you say that there are no data in the Bitmap image? In the sample project I use the bitmap image as the source for a common Silverlight image. And it displays. It is only in the report it is not displaying. I am sorry to bother you again with this, but as it stands now it seems like I cannot send an image to the Stimulsoft report as a variable. Displaying a logo from a configuration setting is a major demand from the project owner for my application so I need to be able to explain this to them and be sure to be correct.
Regards,
Ann
Regards,
Ann
Re: Image as variable in Silverlight - not displaying
Hello.
It's impossible in Silverlight to load image from external link.
You could add image as string or as byte[].
It's a Silverlight restriction.
Thank you.
NExt code doesn't get image:ankaek wrote:Thank you for the reply. What do you mean when you say that there are no data in the Bitmap image? In the sample project I use the bitmap image as the source for a common Silverlight image. And it displays. It is only in the report it is not displaying. I am sorry to bother you again with this, but as it stands now it seems like I cannot send an image to the Stimulsoft report as a variable. Displaying a logo from a configuration setting is a major demand from the project owner for my application so I need to be able to explain this to them and be sure to be correct.
Code: Select all
logo2.UriSource = new Uri("http://upload.wikimedia.org/wikipedia/commons/thumb/a/a6/Asker_komm.svg/90px-Asker_komm.svg.png", UriKind.RelativeOrAbsolute);
You could add image as string or as byte[].
It's a Silverlight restriction.
Thank you.
Re: Image as variable in Silverlight - not displaying
Thank you. My workaround will be to get the images on a server we control (clientaccesspolicy.xml) so that the image can be converted to byte.
Re: Image as variable in Silverlight - not displaying
Hello.
It's a right solution of your problem.
Let us know if you'll get any problems else.
Thank you.
It's a right solution of your problem.
Let us know if you'll get any problems else.
Thank you.