如何创建交叉表报告作为以下报告? [英] How to create cross-tab report as the following report?

查看:347
本文介绍了如何创建交叉表报告作为以下报告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用Crystal Report交叉表创建以下报表?



以下是报表:



 成长率=(去年 - 第一年)/总面积

是我的结果集:

 年份面积PeopleCount 
2005 A 3
2005 B 2
.... .... ....

如果可能,请给我一些建议。

解决方案

我已经把你的示例数据并拉入到csv: http://speedy.sh/cY9d2/test.txt



然后构建报告显示您想要的内容: http://speedy.sh/XC4VJ/test.rpt p>



我相信有一个更简单的方法,但CrossTabs确实引入一些困难。这是我与计算成员结合使用的公式:

 

GridValueAt CurrentRowIndex,GetNumColumns - 3,0)
-
GridValueAt(CurrentRowIndex,0,0)

/ GetTotalValueFor(test_txt.Year)

* 100

只需 GridValueAt(CurrentRowIndex,GetNumColumns - 3, )行取最后一个值, GridValueAt(CurrentRowIndex,0,0)行取第一个值, / GetTotalValueFor (test_txt.Year)为总计。



让我们知道你如何开始,如果需要,解决方案。


Is it possible to use Crystal Report cross-tab to create the following report?

Here is the report:

Growth Rate= (Last Year - First Year)/Total each Area

Here is my result set:

Year    Area    PeopleCount
2005    A       3
2005    B       2
....    ....    ....

If possible, please give me some advice.

解决方案

I've taken your example data and pulled into a csv: http://speedy.sh/cY9d2/test.txt

Then built a report showing what you want: http://speedy.sh/XC4VJ/test.rpt

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

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆