是否可以传递URL徽标的参数,以便徽标可以显示在报告上(报告服务)?

时间:2009-06-15 22:49:55

标签: reporting-services

是否可以传递URL徽标的参数,以便徽标可以显示在报告上(报告服务/ .rdlc文件)?

由于

2 个答案:

答案 0 :(得分:3)

为您的项目添加新的报告控件。

为报告创建报告参数。

报告=>报告参数, 添加参数“HeaderImage”。

将Image控件拖到报表上。 将源设置为“外部” 将值设置为“= Parameters!HeaderImage.Value”

运行报告时运行此代码。

ReportViewer1.LocalReport.EnableExternalImages = true;

List<Microsoft.Reporting.WebForms.ReportParameter> rlist = 
    new List<Microsoft.Reporting.WebForms.ReportParameter>();
rlist.Add(new Microsoft.Reporting.WebForms.ReportParameter("HeaderImage", 
    "http://static.nfl.com/static/site/img/global/nfl-logo.png"));

ReportViewer1.LocalReport.SetParameters(rlist);

希望有所帮助

答案 1 :(得分:0)

您的意思是只是在页面上显示图像吗?如果是这样,您只需使用图像控件。

如果您的意思是网址可能会针对不同的报告方案进行更改,则可以将URL作为字符串传递,然后可以使用表达式设置对它的引用。如果你能提供更多细节,我可能会提供更多帮助。