Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: grouping by month using a formulas Post Reply Post New Topic
Author Message
Seabass
Newbie
Newbie
Avatar

Joined: 06 Jun 2009
Location: United States
Online Status: Offline
Posts: 32
Quote Seabass Replybullet Topic: grouping by month using a formulas
    Posted: 28 Jan 2010 at 6:05am

allright, so i solve my data convert issued, right now i have a formulas field that has a date.

I will like to group my records by month using that field. For some reasons, i cannot find that formula using the group expert... when i click on insert / group there is an option to go to the formula workshop but canot get it to work ....

any inputs will be appreciated...

Thanksin advacne,

Sebastien

 

IP IP Logged
Crystal Method
Newbie
Newbie
Avatar

Joined: 06 Oct 2008
Location: United Kingdom
Online Status: Offline
Posts: 15
Quote Crystal Method Replybullet Posted: 28 Jan 2010 at 6:36am
Hi Sebastien,
 
Create a formula which gives you the month from your date field
 
month(<yourdatefield>)
 
create the group using the formula you have just created
 
Cheers
Seagate Crystal Reports 8.5.0.389 in the guise of INFOR:Reports as part of Infor:COM ERP software.
IP IP Logged
Seabass
Newbie
Newbie
Avatar

Joined: 06 Jun 2009
Location: United States
Online Status: Offline
Posts: 32
Quote Seabass Replybullet Posted: 28 Jan 2010 at 7:23am
awesome !
 
So the result is the month number... for example, 10 for october... is there a way to display as "October 2009" instead ?
IP IP Logged
davejwhite
Newbie
Newbie


Joined: 19 Jan 2010
Online Status: Offline
Posts: 34
Quote davejwhite Replybullet Posted: 28 Jan 2010 at 8:33am
You don't actually have to use a formula for this.
 
If you group by a date field, you get a third dropdown in the Group By dialog box which allows you to state the period you want to use. By month is on that list.
IP IP Logged
davejwhite
Newbie
Newbie


Joined: 19 Jan 2010
Online Status: Offline
Posts: 34
Quote davejwhite Replybullet Posted: 28 Jan 2010 at 8:35am
Oh - the second part of your question.
 
You can use
 
Monthname(Month(<<datefield>>))
 
If you are using the Group By direct on the field (as above), click the Options tab and use this formula to customise the Group Name.
IP IP Logged
Seabass
Newbie
Newbie
Avatar

Joined: 06 Jun 2009
Location: United States
Online Status: Offline
Posts: 32
Quote Seabass Replybullet Posted: 28 Jan 2010 at 8:48am

Thank you so much... i have this report they want later today and i am sad to say that i am stuck on that grouping deal.......

the date was converted using a formulas from a string.....
 
so i can display that date on my report but cannot group using it.... not sure why...when i use the group expert, only the field from the database are listed....
 
i clikc on options... then there is an option to groug using a fomulas but get lost tryingot use it.... in the dropdown above that check mark, the formulas (the one i sed to convert to a date) is not available for selection..
IP IP Logged
davejwhite
Newbie
Newbie


Joined: 19 Jan 2010
Online Status: Offline
Posts: 34
Quote davejwhite Replybullet Posted: 29 Jan 2010 at 1:07am
Hi again,
 
If a formula does not appear in the Group By list, it is because it is being calculated after Crystal Reports does the grouping bit.
 
Are you placing your converted Date in the Details section, or somewhere else? If it's a Details date, it should act like a field and you should be able to group by it.
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.