博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ms reportviewer 外联图片不显示的处理方式
阅读量:4685 次
发布时间:2019-06-09

本文共 1284 字,大约阅读时间需要 4 分钟。

在MS ReportViewer中加上LOGO,在开发过程中一切正常,部署到外网,LOGO不能显示

第一种方式:

图片地址格式化形如:

file:\\\c:\website\logo.jpg

或者

file:c:\website\logo.jpg

问题解决。

 

第二种方式:

            ReportViewer1.LocalReport.EnableExternalImages = true;            ReportViewer1.LocalReport.Refresh();

Code

    public partial class Report : System.Web.UI.Page    {        protected void Page_Load(object sender, EventArgs e)        {            if (!IsPostBack)            {                var path = "file:" + Server.MapPath("\\logo.png");                ReportViewer1.LocalReport.EnableExternalImages = true;                ReportViewer1.LocalReport.SetParameters(new Microsoft.Reporting.WebForms.ReportParameter("Logo1", path));                ReportViewer1.LocalReport.Refresh();            }        }    }

-------------------------------------------------

Hi!!

Solved.
i hust passed has parameter maptofileimage = "file:\\\\\\" + HttpContext.Current.Server.MapPath("~/barcodes") + "\\"
and put
in the image value
=Parameters!mapa.Value + Fields!image.Value
and with this i solved the problem... finally
Thank's very much for your concern.
Marco

参考:

http://answers.flyppdevportal.com/categories/csharp/csharpgeneral.aspx?ID=ff1a2f5b-896f-4eee-919d-97f6e654295b

转载于:https://www.cnblogs.com/rock_chen/archive/2013/03/14/2958901.html

你可能感兴趣的文章
windows live writer 2012 0x80070643
查看>>
C程序的启动和终止
查看>>
asp.net web 定时执行任务
查看>>
tomcat 和MySQL的安装
查看>>
11.5 内部类
查看>>
Cosine Similarity
查看>>
浅谈JAVA集合框架
查看>>
halt和shutdown 的区别
查看>>
git常用操作
查看>>
京东SSO单点登陆实现分析
查看>>
render()方法是render_to_response
查看>>
u-boot启动第一阶段
查看>>
北京大学2019年数学分析考研试题
查看>>
MySQL批量SQL插入性能优化
查看>>
定义列属性:null,default,PK,auto_increment
查看>>
用户画像展示
查看>>
pyqt pyinstaller使用说明
查看>>
C#中StreamReader读取中文出现乱码
查看>>
引用堆中的对象
查看>>
用CSS开启硬件加速来提高网站性能(转)
查看>>