Reporting Services HTML 导出 - 图像大小调整问题
你好。
为了将报表呈现为 HTML 4.0 格式,我使用 ReportExecutionService 类
为了将导出的报表作为流获取,我使用以下代码
:
var ms = new MemoryStream(connection.Render(format, dev_info, out ext, out mime_type, out encoding, out warnings, out streamIds));
问题是:当我在浏览器中显示接收到的流时,具有“适合比例”属性的图像显示不正确。
原始的 SSRS reportViewer 和我的项目图像显示如下图所示:
中的图像属性设计师:
我应该设置哪些配置设置,以便能够像原始 SSRS reportViewer 中一样显示带有来自应用程序的图像的导出报告?
Hello.
In order to execute reports’ rendering into the HTML 4.0 format I use the ReportExecutionService class
In order to get exported report as a stream I use the following code:
var ms = new MemoryStream(connection.Render(format, dev_info, out ext, out mime_type, out encoding, out warnings, out streamIds));
The issue is: when I display the received stream in a browser, the images with the “Fit proportional” property display incorrectly.
The original SSRS reportViewer and my project the images display as in the picture below:
Image properties in the Designer:
What configuration settings should I set so that I am able to display exported report with images from my application as in the original SSRS reportViewer?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据我的经验,在报告中包含图像的最佳方法是将图像预先调整为您希望在报告中显示的实际大小,然后设置为使用“原始大小”。
当调整图像大小时,使用“适合比例”通常似乎会导致图像质量较差,这也可能导致您遇到的问题。
In my experience the best way to include images in reports is to pre-size the images to the actual size you want them displayed in the report and then set to use "Original Size".
Using "Fit Proportional" often seems to result in poor image quality when the image is resized, it could also be causing the issue you are seeing as well.