How to display image on image control on stimulsoft report
Posted: Mon Apr 01, 2013 12:01 pm
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);
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);