Set the image in BeforePrint event
Set the image in BeforePrint event
Hello.
I am trying to set the Image property of the Image controls in the beforeprint event. My image is placed in the same folder where the report is. But, I cannot get the path of the report. I have tried using this code, but I get an error:
Image1.Image = Image.FromFile("logo.jpg")
This also doesn't work:
Image1.Image = Image.FromFile("\\logo.jpg")
Is there any way to get the path of the report?
Thanks in advance.
Ivan
I am trying to set the Image property of the Image controls in the beforeprint event. My image is placed in the same folder where the report is. But, I cannot get the path of the report. I have tried using this code, but I get an error:
Image1.Image = Image.FromFile("logo.jpg")
This also doesn't work:
Image1.Image = Image.FromFile("\\logo.jpg")
Is there any way to get the path of the report?
Thanks in advance.
Ivan
Set the image in BeforePrint event
Hello,
Please see the sample report in attachment.
Thank you.
Please see the sample report in attachment.
Thank you.
- Attachments
-
- 781.Sample.zip
- (8.51 KiB) Downloaded 424 times
Set the image in BeforePrint event
Hi, Aleksey.
Thank you very much for the reply. Unfortunately, it's still not working. The image is not shown in my Image1 control. I don't know what syntax to use to set the image file path the same as the report file path. I have tried "\\myimage.png" and "myimage.png", but it's not working If you have any suggestions, I would really appreciate it.
Thank you,
Ivan
Thank you very much for the reply. Unfortunately, it's still not working. The image is not shown in my Image1 control. I don't know what syntax to use to set the image file path the same as the report file path. I have tried "\\myimage.png" and "myimage.png", but it's not working If you have any suggestions, I would really appreciate it.
Thank you,
Ivan
Set the image in BeforePrint event
Hello,
Please send us your .MRT file with database for analysis.
Thank you.
Please send us your .MRT file with database for analysis.
Thank you.
Set the image in BeforePrint event
Hi.
It's a report that connects to a big sql server database. The problem is that even your sample application is not showing an image1, image2, image3 to me. Is it possible this is due to version of my stimulsoft reports? I have a 2011.1.904.0 version running on Win 7.
Thanks,
Ivan
It's a report that connects to a big sql server database. The problem is that even your sample application is not showing an image1, image2, image3 to me. Is it possible this is due to version of my stimulsoft reports? I have a 2011.1.904.0 version running on Win 7.
Thanks,
Ivan
Set the image in BeforePrint event
Hello,
The ReportFile property of the report contain the filename of the report (if report was loaded from the file).
Please check the "SampleReport2.mrt" in attachment.
Thank you.
The ReportFile property of the report contain the filename of the report (if report was loaded from the file).
Please check the "SampleReport2.mrt" in attachment.
Thank you.
- Attachments
-
- 790.Sample2.zip
- (7.57 KiB) Downloaded 487 times
Set the image in BeforePrint event
That is what I was looking for!! Thank you very much!
Best regards,
Ivan
Best regards,
Ivan
Set the image in BeforePrint event
Great!
Have a nice day!
Have a nice day!