我可以在Reporting Services报告的页眉中使用查询中的数据吗?

时间:2023-01-14 00:06:44

I am pretty sure I cannot, but I would just like to double check - can I use data in a query in the Page Header of a Reporting Services report?

我很确定我不能,但我只想仔细检查 - 我可以在Reporting Services报告的页眉中使用查询中的数据吗?

Thanks!

3 个解决方案

#1


There is a little hack that you can do, although it's long winded. If you create a hidden report parameter that is loaded with the value you want in the header, then you can refer to the parameter (=Parameters!MyParameterName.Value) in the report Header/Footer.

你可以做一点点黑客攻击,虽然它很长。如果您创建一个隐藏的报表参数,该参数在标题中加载了您想要的值,那么您可以在报表页眉/页脚中引用参数(= Parameters!MyParameterName.Value)。

Not great, but if you really need it then this should work.

不是很好,但如果你真的需要它,那么这应该工作。

#2


I think this answers my question for me:

我想这回答了我的问题:

SQL Server Reporting Services: Report Header cannot show data fields

SQL Server Reporting Services:报表头不能显示数据字段

#3


You tend to struggle doing this, as i think the header is created before any of the queries have actually been ran, so the data is not available

你倾向于这样做,因为我认为在任何查询实际运行之前创建了标题,因此数据不可用

#1


There is a little hack that you can do, although it's long winded. If you create a hidden report parameter that is loaded with the value you want in the header, then you can refer to the parameter (=Parameters!MyParameterName.Value) in the report Header/Footer.

你可以做一点点黑客攻击,虽然它很长。如果您创建一个隐藏的报表参数,该参数在标题中加载了您想要的值,那么您可以在报表页眉/页脚中引用参数(= Parameters!MyParameterName.Value)。

Not great, but if you really need it then this should work.

不是很好,但如果你真的需要它,那么这应该工作。

#2


I think this answers my question for me:

我想这回答了我的问题:

SQL Server Reporting Services: Report Header cannot show data fields

SQL Server Reporting Services:报表头不能显示数据字段

#3


You tend to struggle doing this, as i think the header is created before any of the queries have actually been ran, so the data is not available

你倾向于这样做,因为我认为在任何查询实际运行之前创建了标题,因此数据不可用