Problem with InteropBitmap
Problem with InteropBitmap
Hello,
I am moving from Reports.net to Reports.Wpf but i have to keep backward compatibility.
This is why I have to use your function StiImageHelper.GetBitmapImageFromImage to convert a System.Drawing.Image to a BitmapSource.
This function returns an InteropBitmap which works as expected in the WPF userinterface. When I try to show this InteropBitmap in a Report nothing is displayed.
Because InteropBitmap is a BitmapSource, it should be possible to display the image in a report?
What am I doing wrong?
Kind regards,
Michael
I am moving from Reports.net to Reports.Wpf but i have to keep backward compatibility.
This is why I have to use your function StiImageHelper.GetBitmapImageFromImage to convert a System.Drawing.Image to a BitmapSource.
This function returns an InteropBitmap which works as expected in the WPF userinterface. When I try to show this InteropBitmap in a Report nothing is displayed.
Because InteropBitmap is a BitmapSource, it should be possible to display the image in a report?
What am I doing wrong?
Kind regards,
Michael
Problem with InteropBitmap
Hello,
We do not quite understand how do you use this method and, if possible, please send us an example. We have made an example in which it works perfectly, please see the attached file.
Thank you.
We do not quite understand how do you use this method and, if possible, please send us an example. We have made an example in which it works perfectly, please see the attached file.
Thank you.
- Attachments
-
- 831.WpfApplication1.zip
- (14.33 KiB) Downloaded 291 times
Problem with InteropBitmap
Hello Andrew,
thanks for your answer!
It seems I can not up upload the modified sample project to this entry.
You will find the modified project which shows my problem here: *****
If you click the button the designer will open with a little report. If you click "preview" you will see, that the image in the datasource won't be displayed.
Please tell me what I have to do to show the image in a report,
Kinde regards,
Michael
thanks for your answer!
It seems I can not up upload the modified sample project to this entry.
You will find the modified project which shows my problem here: *****
If you click the button the designer will open with a little report. If you click "preview" you will see, that the image in the datasource won't be displayed.
Please tell me what I have to do to show the image in a report,
Kinde regards,
Michael
Problem with InteropBitmap
Hello,
We have slightly changed your Application.
Thank you.
We have slightly changed your Application.
Thank you.
- Attachments
-
- 832.WpfApplication1.zip
- (14.97 KiB) Downloaded 288 times
Problem with InteropBitmap
Hello Andrew,
thanks for your answer, but this solution is not possible for me.
This image to print will be provided by webservice as InteropBitmap. We can not change it to System.Drawing.Image.
The whole Application works with InteropBitmap since it derives from BitmapSource.
What can I do to display objects of type InteropBitmap in Stimulsoft.
Kind regards,
Michael
thanks for your answer, but this solution is not possible for me.
This image to print will be provided by webservice as InteropBitmap. We can not change it to System.Drawing.Image.
The whole Application works with InteropBitmap since it derives from BitmapSource.
What can I do to display objects of type InteropBitmap in Stimulsoft.
Kind regards,
Michael
Problem with InteropBitmap
Hello,
In BeforePrint event of image component you can use the following code:
Gets or sets the WPF visual object that appeared as a result of the component rendering. This property accepts objects of two types: DrawingVisual and ImageSource.
Thank you.
In BeforePrint event of image component you can use the following code:
Code: Select all
Image1.ObjectToDraw = logo.BitmapImage;
Thank you.
- Attachments
-
- 833.WpfApplication1.zip
- (23.53 KiB) Downloaded 292 times
Problem with InteropBitmap
Hello Aleksey,
thanks for your help, now it works!
But it's not a nice solution since the designer of the report has to write code to display an image.
Can this be fixed in the future?
Kind regards,
Michael
thanks for your help, now it works!
But it's not a nice solution since the designer of the report has to write code to display an image.
Can this be fixed in the future?
Kind regards,
Michael
Problem with InteropBitmap
Hello Michael,
On the current moment, it remains to be this way, because it is very specific to the WPF technology. But our report engine supports compatibility with .NET, WPF, and Web.
Thank you.
On the current moment, it remains to be this way, because it is very specific to the WPF technology. But our report engine supports compatibility with .NET, WPF, and Web.
Thank you.