Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Grouping with customized group name Post Reply Post New Topic
Author Message
CrystalVoyager
Newbie
Newbie
Avatar

Joined: 28 Aug 2007
Online Status: Offline
Posts: 7
Quote CrystalVoyager Replybullet Topic: Grouping with customized group name
    Posted: 25 Oct 2007 at 8:45am

Hi,

I am attempting to group data based on a certain date range. At which point I need to use a customized group name. I have successfully passed crystal a detail dataset and in the report grouped by month but my starting point must be the current month with subsequent month groups and customized group names.

Any help would be greatly appreciated, Thanks.

Helping to make the world a better place, one response at a time.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 25 Oct 2007 at 12:18pm
I'm confused. If the data starts with the current month, how are there subsequent month groups? Plus, have you tried the different group options to group on a custom formula? You can also use the group option to display a formula as the group name instead of the field being grouped on.
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
CrystalVoyager
Newbie
Newbie
Avatar

Joined: 28 Aug 2007
Online Status: Offline
Posts: 7
Quote CrystalVoyager Replybullet Posted: 25 Oct 2007 at 12:46pm

The user would like to see data from 1/1/2003 to the CurrentMonth and name that Group1. The subsequent groups would be from 1/1/2003 through CurrentMonth + 1, titled  Group2 and so on.  

Helping to make the world a better place, one response at a time.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 25 Oct 2007 at 2:12pm
You need to write a formula. Something with this type of logic:
if Month(field)<=Month(Now) Then
1
else
Month(field) - Month (now) +1

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
CrystalVoyager
Newbie
Newbie
Avatar

Joined: 28 Aug 2007
Online Status: Offline
Posts: 7
Quote CrystalVoyager Replybullet Posted: 26 Oct 2007 at 10:37am
Thank you. 
Helping to make the world a better place, one response at a time.
IP IP Logged
great_mamun
Newbie
Newbie
Avatar

Joined: 23 Nov 2007
Online Status: Offline
Posts: 10
Quote great_mamun Replybullet Posted: 23 Nov 2007 at 11:59pm
But I have some problem about grouping...
I want to show group specific order by particular field where value start with dynamic value. ( It is possible for Static Value). I am using Visual Stdio.Net 2005

Best Regards,
Abdullah Al Mamun
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.