Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Group By option Post Reply Post New Topic
Author Message
wan2fly99
Newbie
Newbie


Joined: 06 May 2010
Online Status: Offline
Posts: 15
Quote wan2fly99 Replybullet Topic: Group By option
     Posted: 06 May 2010 at 9:39am
have a report that is grouoped by a date field

In the group options there I see I can change to
display data by:

for each day
for each week

Can I change that option dynamically say using a parameter value or a formula?

say: Ask the user to group dates by day by week?

I know I can do two reports but that means mainting two reports instead of one

Any help is appreciated
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 May 2010 at 10:25am
I have wondered abou that and am not sure if there is a function to do that.
Here is a work around...

You can use a formula field that flips a text description between the 2 options and then group on this formula field

if {param}= "week" then totext({table.date},'yyyy-') + totext(datepart('ww',{table.date})) else
if {param}= "day" then totext({table.date},'yyyy-') + totext(datepart('y',{table.date}))
IP IP Logged
wan2fly99
Newbie
Newbie


Joined: 06 May 2010
Online Status: Offline
Posts: 15
Quote wan2fly99 Replybullet Posted: 06 May 2010 at 2:03pm
Okay  I will give this  a try
 
thanks for the help
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