Print Page | Close Window

How to create a group name like in Excel

Printed From: Crystal Reports Book
Category: General Information
Forum Name: Announcements
Forum Discription: Please check this section for the latest announcements from Crystal Reports Forum
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=14421
Printed Date: 04 May 2024 at 6:37am


Topic: How to create a group name like in Excel
Posted By: lassaad33
Subject: How to create a group name like in Excel
Date Posted: 20 Sep 2011 at 2:52am

Hello,
I am starting to Crystal Reports. Net
Question:
How to create a group name like in Excel:

Example:

Groub by: Start:10

          End:100

          with:15?

I had as results:

10-25
25-40

40-55

....

many thanks in advance :)



Thanks in advance :)



Replies:
Posted By: lassaad33
Date Posted: 20 Sep 2011 at 2:54am
Anyone, please?


Posted By: lassaad33
Date Posted: 20 Sep 2011 at 2:56am
Hi,

Anyone, please?


Posted By: BrianBischof
Date Posted: 20 Sep 2011 at 7:57am
Hi Iassaad,

First off, this is a voluntary forum. No one is getting paid here. Posting your question every two minutes and sending me multiple emails during the middle of the night is not going to get your question answered any faster.

Anyway, you need to create a formula that returns a group number and then create your group on this formula. I would do something like this:

NumberVar GroupNumber;
GroupNumber = Int(({yourtable.yourfield} - 10)/15);

By subtracting 10 from the field, that is your starting number. Then by taking the Int() of dividing that number by 15, you will get a group number.

I just typed this in without testing it, so you might have to tweak it a bit. But this should be pretty close to what you need and will get you started in the right direction.


Brian


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


Posted By: lassaad33
Date Posted: 20 Sep 2011 at 9:22pm
Hi member_profile.asp?PF=4&FID=1 - BrianBischof ,

Sorry :)

I apologize for the disturbance

many thanks to your response.






Print Page | Close Window