如何创建交叉表报表作为以下报表? [英] How to create cross-tab report as the following report?
问题描述
是否可以使用水晶报表交叉表来创建以下报表?
Is it possible to use Crystal Report cross-tab to create the following report?
报告如下:
Growth Rate= (Last Year - First Year)/Total each Area
这是我的结果集:
Year Area PeopleCount
2005 A 3
2005 B 2
.... .... ....
如果可以的话,请给我一些建议.
If possible, please give me some advice.
推荐答案
我已将您的示例数据提取到 csv 中:http://speedy.sh/cY9d2/test.txt
I've taken your example data and pulled into a csv: http://speedy.sh/cY9d2/test.txt
然后建立一个报告显示你想要什么:http://speedy.sh/XC4VJ/test.rpt
Then built a report showing what you want: http://speedy.sh/XC4VJ/test.rpt
我确信有一种更简单的方法,但 CrossTabs 确实会带来一些困难.这是我与计算成员一起使用的公式:
I'm sure there's an easier way but CrossTabs do introduce some difficulties. Here's the formula i've used in conjunction with a calculated member:
(
(
GridValueAt (CurrentRowIndex, GetNumColumns - 3, 0)
-
GridValueAt (CurrentRowIndex, 0, 0)
)
/ GetTotalValueFor ("test_txt.Year")
)
* 100
GridValueAt (CurrentRowIndex, GetNumColumns - 3, 0)
行取最后一个值,GridValueAt (CurrentRowIndex, 0, 0)
行取第一个值,/GetTotalValueFor("test_txt.Year")
行合计.
Simply the GridValueAt (CurrentRowIndex, GetNumColumns - 3, 0)
line takes the last value, the GridValueAt (CurrentRowIndex, 0, 0)
line takes the first value and / GetTotalValueFor ("test_txt.Year")
line the total.
让我们知道您的进展情况,如果需要,我们可以提出一些替代解决方案.
Let us know how you get on and if needed we can come up with some alternative solutions.
这篇关于如何创建交叉表报表作为以下报表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!