Reputation: 457
I am using ssrs for the reporting .I am sending parameter list including image url as a parameter. My report is unable to show image while rendering .
My image is in root folder of my web app.
i have sent image url like this
string path = "http://" + Request.Url.Host;
path = path + ":" + Request.Url.Port;
path = path + "/Image/Logo.png";
querystrings.Add(new KeyValuePair<string, string>("Logo_Url", path));`
I hope my question is clear. I have tried hard to make to clear so that i could be helped. thank you in advance.
for more clearance to my question
Report.ServerReport.SetParameters(lst1);
byte[] b = Report.ServerReport.Render("PDF");Response.Clear();
Response.ContentType = "application/pdf";
Response.OutputStream.Write(b, 0, b.Length);
Response.End();
This is how i export my report to pdf. Hope i ll get some idea around this
Upvotes: 1
Views: 991
Reputation: 457
after all this i come to the solution
And i got what i was looking for .
Upvotes: 1
Reputation: 11105
If everything is ok when you preview your report in ReportViewer, maybe is a permission problem.
Check external images section in this document: Adding Images to a Report
When the report is previewed in Report Designer, preview uses the credentials of the user to display the image. When the report is run on the report server, the report server uses the unattended execution account to retrieve the image. If the unattended execution account is not specified, the image is retrieved using no credentials (anonymous user account). If either of these accounts have insufficient rights to access the image, the image will not be displayed in the report. For more information about the unattended execution account, see Configuring the Unattended Execution Account.
Upvotes: 0