Binod
Binod

Reputation: 457

ssrs-Image url-It is all ok while opening report but when i export it to pdf image couldnot be viewed

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 .


            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

Answers (2)

Binod
Binod

Reputation: 457

after all this i come to the solution


  • created a folder for my image in report server enter image description here

  • then i create a execution account.Use acount having reading only property avoid using account having high permissionsUse acount having reading only property avoid using account having high permissions

And i got what i was looking for .

Upvotes: 1

tezzo
tezzo

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

Related Questions