如何在rdlc报告中执行行总计和列总计 [英] How to perform row total and column total in rdlc reports
问题描述
大家好,
我想使用Matrix工具执行rdlc报告的行总计和列总数。
目前的RDLC报告结构
-------------------
|城市|年份|
-------------------
|城市|人口|
-------------------
输出RDLC报告
---------------------------- ----------------------------------
|城市| 2011 2012 | 2013 | 2014 |
---------------------------------------- ----------------------
| Banglore | 9000000 | 9000970 | 9001166 | 9002008 |
---------------------------------------- ----------------------
|海德拉巴| 8001456 | 8001478 | 8001961 | 8002085 |
---------------------------------------- ----------------------
|孟买| 10010490 | 10012871 | 10012866 | 10013008 |
---------------------------------------- -----------------------
| NewDelhi | 10010120 | 10011011 | 10012016 | 10012708 |
---------------------------------------- ----------------------
必填输出
----------------------------- ---------------------------------------------
|城市| 2011 | 2012 | 2013 | 2014 |总计|
---------------------------------------- ----------------------------------
| Banglore | 9000000 | 9000970 | 9001166 | 9002008 | 36004144 |
---------------------------------------- ----------------------------------
|海德拉巴| 8001456 | 8001478 | 8001961 | 8002085 | 32006980 |
---------------------------------------- ----------------------------------
|孟买| 10010490 | 10012871 | 10012866 | 10013008 | 40049235 |
---------------------------------------- ----------------------------------
| NewDelhi | 10010120 | 10011011 | 10012016 | 10012708 | 40045855 |
---------------------------------------- ----------------------------------
|总计| 37022066 | 37026330 | 37028009 | 37028009 | 148106214 |
---------------------------------------- ----------------------------------
请告诉我如何为上述格式创建RDLC Report Structut。
谢谢和问候
Santosh
Hi All,
I want to perform the row total and column total of a rdlc report using the Matrix Tool.
Present RDLC Report Structure
-------------------
|City | Year |
-------------------
|City | Population |
-------------------
Output of RDLC Report
--------------------------------------------------------------
|City | 2011 2012 | 2013 | 2014 |
--------------------------------------------------------------
|Banglore | 9000000 | 9000970 | 9001166 | 9002008 |
--------------------------------------------------------------
|Hyderabad | 8001456 | 8001478 | 8001961 | 8002085 |
--------------------------------------------------------------
|Mumbai | 10010490 | 10012871 | 10012866 | 10013008 |
---------------------------------------------------------------
|NewDelhi | 10010120 | 10011011 | 10012016 | 10012708 |
--------------------------------------------------------------
Required Output
--------------------------------------------------------------------------
|City | 2011 | 2012 | 2013 | 2014 | Total |
--------------------------------------------------------------------------
|Banglore | 9000000 | 9000970 | 9001166 | 9002008 | 36004144 |
--------------------------------------------------------------------------
|Hyderabad | 8001456 | 8001478 | 8001961 | 8002085 | 32006980 |
--------------------------------------------------------------------------
|Mumbai | 10010490 | 10012871 | 10012866 | 10013008 | 40049235 |
--------------------------------------------------------------------------
|NewDelhi | 10010120 | 10011011 | 10012016 | 10012708 | 40045855 |
--------------------------------------------------------------------------
|Total | 37022066 | 37026330 | 37028009 | 37028009 | 148106214 |
--------------------------------------------------------------------------
Please let me know how to create the RDLC Report Structutre for the above format.
Thanks and Regards
Santosh
推荐答案
您可以使用范围SUM表达式来实现所需的总计。假设您已创建所需的行和列组,请使用具有以下数据排列的矩阵。
请注意,在您的情况下,它是[Sum(Amount)]而不是我的案例中的[Sum(Value)]。
为了显示总数,只需在组项目外添加行和列,分别为。
选择[item]行(第二行)并右键单击,转到插入行并选择外部组 - 下面。
要添加列,请选择[月]列(第二列),右键单击它并选择插入列然后在组外 - 右边。
现在在突出显示的单元格中添加这些表达式为红色,查看第一张图片。
1:= Sum(Fields!Amount.Value,Month)
2:= Sum(Fields!Amount.Value,item)
它将生成以下矩阵:
You can achieve the required totals using scoped SUM expressions. Supposing you have created the needed rows and columns groups, use a matrix with the following data arrangement.
Note in your case it is [Sum(Amount)] instead of [Sum(Value)] in my case.
For showing the totals just add the row and the column outside the groups item and Month respectively.
Select the [item] row (second row) and right click, go to insert row and select outside group - below.
To add the column select the [month] column (second column), right click it and select insert column then outside group - right.
Now add these expressions in the highlighted cells in red, check the first image.
1: =Sum(Fields!Amount.Value,"Month")
2: =Sum(Fields!Amount.Value,"item")
It will produce the following matrix:
这篇关于如何在rdlc报告中执行行总计和列总计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!