Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Grouping by week and change name Post Reply Post New Topic
Author Message
LiuxDj
Newbie
Newbie
Avatar

Joined: 10 Mar 2009
Location: Italy
Online Status: Offline
Posts: 23
Quote LiuxDj Replybullet Topic: Grouping by week and change name
     Posted: 24 Jun 2010 at 10:13pm
HEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEELP!

Hi everyone!

I'm working on a report and i'm grouping by WEEKS of month.

Now, I want to view in the Group Panel something like this:

WEEK 1
WEEK 2
WEEK 3
WEEK 4
WEEK last days (when month > 28 days)

Every formula that I wrote does not work because it have to be "valuated after"! (beacause i'm working on group options --> show group name as a formula.)

Please can you help me?

Thanks for your help!
Bye!

Edited by LiuxDj - 24 Jun 2010 at 10:15pm
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 25 Jun 2010 at 4:16am
my guess... don't bother with that option...the group name can be anything.  Create a formula to evaluate the data (and as long as the data that is used in the formula is the datatable and available at the time the data is read...so no calling other formula/running totals/variables in memory) and group on that.  Then you can display whatever verbiage you want...it can be from any formula.
 
Say your grouping formula is something like: (and say it has name of 'weekNo')
CINT((DAY({table.field})-1)/7  //this will give results0-4
 
CR can easily group on this value, for the display you would have a formula like:
if {@weekNo} < 4 then
  "Week " + totext({@weekNo} + 1, 0, "")
else
  "Week last days"
 
 
HTH
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