Image not load properly on report.
Image not load properly on report.
I have an image control in databand. When I attach my xml and xsd to report template it shows the image.
But if I call and load data with c# code image are not on report.
I have try to create a demo. it may help u to understand the issue.
Thank You
But if I call and load data with c# code image are not on report.
I have try to create a demo. it may help u to understand the issue.
Thank You
Re: Image not load properly on report.
Hello,
Please check your code. In your code you do not load report. You create a empty report, pass data and show empty report.
Thank you.
Please check your code. In your code you do not load report. You create a empty report, pass data and show empty report.
Thank you.
Re: Image not load properly on report.
Yes, I need to describe more about issue. I have the code line report.Load(TemplatePath); in my code and I find images on my report pdf.
But if I try the same code in my actual project which get the server path for image like (\\192.160.90.1\\User\\[ImageName]) it does not work.
dataSet.ReadXml(DataFilePath);
report.Load(templatePath);
report.Dictionary.Clear();
report.RegData("New Connection", "new", dataSet);
report.Dictionary.Synchronize();
report.Compile();
report.Render();
report.ExportDocument(Stimulsoft.Report.StiExportFormat.Pdf, ServerPath);
Code: Select all
protected void Page_Load(object sender, EventArgs e)
{
StiReport report = new StiReport();
DataSet ds = new DataSet();
report.Load(@"D:\testPrj\Test.mrt");
report.Dictionary.Clear();
DataTable dt = new DataTable("Test");
dt.Columns.Add("ID");
dt.Columns.Add("ImagePath");
DataRow dr ;
dr= dt.NewRow();
dr["ID"] = "1";
dr["ImagePath"] = @"D:\testPrj\Test.jpg";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr["ID"] = "2";
dr["ImagePath"] = @"D:\testPrj\Test1.jpg";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr["ID"] = "3";
dr["ImagePath"] = @"D:\testPrj\Test2.jpg";
dt.Rows.Add(dr);
ds.Tables.Add(dt);
report.RegData(ds);
report.Dictionary.Synchronize();
report.Compile();
report.Render();
report.ExportDocument(Stimulsoft.Report.StiExportFormat.Pdf, @"D:\testPrj\Test.pdf");
}
dataSet.ReadXml(DataFilePath);
report.Load(templatePath);
report.Dictionary.Clear();
report.RegData("New Connection", "new", dataSet);
report.Dictionary.Synchronize();
report.Compile();
report.Render();
report.ExportDocument(Stimulsoft.Report.StiExportFormat.Pdf, ServerPath);
Last edited by roomy on Tue Feb 18, 2014 7:35 am, edited 1 time in total.
Re: Image not load properly on report.
Hello,
If you run your project on the server, that the path to image gets from the server. This image should be placed on the server in the "D:\testPrj" folder.
If you run your project on the server, that the path to image gets from the server. This image should be placed on the server in the "D:\testPrj" folder.
Re: Image not load properly on report.
I am not able to load server images on stimulsoft report, there is any path related issue??
problem with server relative paths for images??
problem with server relative paths for images??
Re: Image not load properly on report.
Hello,
Well, actually, that's right. If you run the report on the server then the paths are taken on the server.
Well, actually, that's right. If you run the report on the server then the paths are taken on the server.
Re: Image not load properly on report.
Thanks to confirm this.
Then How can i link my dynamicly created images with reports and these image files are exist outside the application folder on server.
Then How can i link my dynamicly created images with reports and these image files are exist outside the application folder on server.
Re: Image not load properly on report.
Hello.
Also you should set the Data Column property of the Image component instead of the Image URL.
Thank you.
You could try to add images to DataSet as Byte Array and register this DataSet in your report.roomy wrote:Then How can i link my dynamicly created images with reports and these image files are exist outside the application folder on server.
Also you should set the Data Column property of the Image component instead of the Image URL.
Thank you.
Re: Image not load properly on report.
Thanks Aleksey.
Re: Image not load properly on report.
Hello.
We are always glad to help you.
Let us know if you need any additional help.
Thank you.
We are always glad to help you.
Let us know if you need any additional help.
Thank you.