How to display image on image control on stimulsoft report

Stimulsoft Reports.NET discussion
Post Reply
nicegaurav
Posts: 91
Joined: Mon Oct 15, 2012 10:03 am

How to display image on image control on stimulsoft report

Post by nicegaurav »

Hi,
Facing problem to display image on image control, when using mrt file on visual studio, on the other end all content of the report display. On testing purpose pass Image URL on mrt it is working fine on designer and image is showing on the report but when I call the report through visual studio it is not displaying image on report.
Please help me out,
Below is the code which I used for this.. if any modification required please let me know.

StiReport report = new StiReport();
report.Load(@"D:\GraphTest.mrt");
report.Compile();
StiImage Img = report.GetComponents()["Image1"] as StiImage;
string strGraphName = @"D:\Image.emf";

System.Drawing.Image myImage = System.Drawing.Image.FromFile(strGraphName);
Img.Image = myImage;
report.Render();
StiPdfExportService pdfExport = new StiPdfExportService();
pdfExport.ExportPdf(report, reportPath);
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: How to display image on image control on stimulsoft repo

Post by Alex K. »

Hello,

Please try to use the following code:
report.Compile();
StiImage Img = report.CompiledReport.GetComponents()["Image1"] as StiImage;

Thank you.
nicegaurav
Posts: 91
Joined: Mon Oct 15, 2012 10:03 am

Re: How to display image on image control on stimulsoft repo

Post by nicegaurav »

thanks :)
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: How to display image on image control on stimulsoft repo

Post by Alex K. »

Hello,

We are always glad to help you!
Let us know if you need any additional help.

Thank you.
Post Reply