Crystal Reports按值分组 [英] Crystal Reports Grouping by Values

查看:72
本文介绍了Crystal Reports按值分组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须设计一个水晶报表,其中必须从数据库的特定字段中检索值。但是,此字段中有许多条目,其后跟随的是按数字递增,即从1到10000,然后从10000到20000,从20000到30000,依此类推。

I have to design a crystal report in which I have to retrieve values from a particular field in a database. But this field has many entries that follow increase numerically i.e., 1 to 10000, then 10000 to 20000, 20000 to 30000 etc..

现在我想将它们分组为一组中的1到10000,另一组中的10000到15000,另一组中的15000到20000。我怎么做?我会很感激的。

Now I want to group them in a way that 1 to 10000 are in one group, 10000 to 15000 in another and 15000 to 20000 in another. How do I do that? I will be grateful for a response.

推荐答案

设置一个Crystal公式,类似于:

Set up a Crystal formula, similar to:

     if {myTable.myField} >= 1 and {myTable.myField} <= 10000 then 'A'
else if {myTable.myField} > 10000 and {myTable.myField} <= 15000 then 'B'
else if {myTable.myField} > 15000 and {myTable.myField} <= 20000 then 'C'

-并分组为新公式。

这篇关于Crystal Reports按值分组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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