sql-server - 按报表项目计算排序行组
问题描述
我的报告中有一个计算reportitems!Textbox42.Value - reportitems!Textbox39.value
如何通过此计算对行组进行排序,排序中不接受报表项。
我尝试根据上述表达式创建一个计算字段,但得到一个错误FieldValue are denying reportitems
解决方案
您不能ReportItems!Test.Value
在计算字段中使用,这是不可能的以及聚合函数。
您必须在 tablix 的排序表达式中编写计算。例如:
'Expression of Textbox1 in Tablix1
=Fields!Sales.Value - Fields!Income.Value
'Expression of Textbox2 in Tablix1
=Fields!Sales.Value / Fields!Income.Value
'The next two expressions are the same
=ReportItems!Textbox1 * ReportItems!Textbox2 'Label1
=(Fields!Sales.Value - Fields!Income.Value) * (Fields!Sales.Value / Fields!Income.Value) 'Label2
转到Tablix Properties > Sorting > Add > Expression下的 tablix并写入来自Label2的表达式。这样你就可以根据你的表达进行排序。
如果您的 tablix 中有一些分组,您也可以在Row Groups > Group Properties (下拉) > Sorting > Add > Expression下转到 tablix 。
推荐阅读
- variance - 计算测量平方和
- mongodb - 注释和版本的猫鼬模式
- android - 如何更改 Google Analytics(分析)媒体资源中的跟踪 ID
- javascript - menu.on('click', function() 解释
- oracle - ORACLE 使用 SERIALIZABLE 到 PL/SQL 以下载一致的数据
- regex - 我们可以在 NotePad++ 中搜索必须在同一行中的 2 个字符串吗?
- c# - 如何在 dotnet core 中操作浏览器?
- java - Lombok onlyExplicitlyIncluded 配置键
- python - 关闭()后无法删除python文件
- php - PHP多维数组具有另一个多维数组的所有子数组