Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: crosstab range Post Reply Post New Topic
Author Message
mgonzalez
Newbie
Newbie


Joined: 20 Aug 2008
Online Status: Offline
Posts: 4
Quote mgonzalez Replybullet Topic: crosstab range
     Posted: 20 Aug 2008 at 12:06pm
Hello,
 
I am building a crosstab into a report. This crosstab delas with the amount that someone is charging for something. The other thing the crosstab shows is the number of companies that have something at this price for example:
 
2.50    1
4.65    2
5.25    3
10.02  4
10.03  2
12.20  5
 
When I list it, it lists exactly like that. However, there are far too many records (almost 76). What I want to do is show them so that they are in a range. So for example it would then look like this:
 
2.50 - 4.65     3
5.25 - 10.02   7
10.03 - 12.20  8
 
 
Is there a way to do this? I am using CR XI (11).
 
Thanks!
 
--Matt
 


Edited by mgonzalez - 20 Aug 2008 at 12:09pm
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 20 Aug 2008 at 1:37pm

Welcome to the forum Matt. This can be accomplished by creating a formula that returns the grouping values you want to display and using that formula in the cross-tab object. Here is an example:

SELECT {table.cost}
   CASE 0 TO 2.5:
      "0 to 2.5"
   CASE 2.6 TO 5:
       "2.5 to 5";
;
You can tweak this for your own circumstances and it should give you the results you want.
 
I actually this example already documented in Chapter 13 of my Encyclopedia book (as well as numerous other advanced cross-tab tips and tricks). You can find out more about my books at Amazon.com or reading the Crystal Reports eBooks online.
 
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
mgonzalez
Newbie
Newbie


Joined: 20 Aug 2008
Online Status: Offline
Posts: 4
Quote mgonzalez Replybullet Posted: 20 Aug 2008 at 2:39pm
That worked perfectly... Thanks a lot!!! Yeah this is my first time with CR... Learning a lot... I will have to take a look at those books and possibly pick up one.

Edited by mgonzalez - 20 Aug 2008 at 2:40pm
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum