【发布时间】:2013-07-04 05:14:39
【问题描述】:
我正在使用 ssrs 进行报告。我正在发送参数列表,其中包括图像 url 作为参数。我的报告在渲染时无法显示图像。
我的图像位于我的网络应用程序的根文件夹中。
我已经发送了这样的图片网址
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));`
- 打开报告时一切正常,但是当我将其导出为 pdf 时无法查看图像。
我希望我的问题很清楚。我已经努力澄清,以便我能得到帮助。 提前谢谢你。
为了更清楚我的问题
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();
这就是我将报告导出为 pdf 的方式。希望我能对此有所了解
【问题讨论】:
-
所以您的 ReportViewer 中的预览没问题,问题只是在您导出为 PDF 时?如果您尝试导出到 Excel 或 Word,会发生什么情况?
-
未加载相同的问题图像。 :(
-
在 ReportViewer 中预览报告时一切正常吗?
-
是的,使用 ReportViewer 一切都很好。现在我正在尝试将图像文件夹添加到报表服务器。
标签: asp.net reporting-services