Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Changing Crosstab Frequency Post Reply Post New Topic
Author Message
jpavlik
Newbie
Newbie


Joined: 31 Jan 2007
Online Status: Offline
Posts: 3
Quote jpavlik Replybullet Topic: Changing Crosstab Frequency
    Posted: 31 Jan 2007 at 9:07am
Hi,
 
I see your book chapter on customizing the crosstab column groupings and can see how to change it to also allow monthly groupings.  But I can't see how to extend further to weeks.  I'd like to display the first date of the week in the column.
 
To be honest, it looks like the formula sets the column names but I don't see how that affects the grouping itself as well.
 
John
 
p.s. looking forward to the new book - I bought the .NET programming book just to have a physical reference.
 
 
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 31 Jan 2007 at 9:31am
Thanks for buying the .NET book!    I'm hoping to have the XI book out in  a few months. (crossing my fingers...)

Re the cross-tab columns, the cross-tab groups on whatever value your formula returns. Swap out the month formula with your week formula and everything else is done automatically.
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
jpavlik
Newbie
Newbie


Joined: 31 Jan 2007
Online Status: Offline
Posts: 3
Quote jpavlik Replybullet Posted: 31 Jan 2007 at 12:12pm
I see - so
 
CStr(CDate(DateAdd("d", -(DatePart("w", {@RoomViewDateSelect}) - 1), {@RoomViewDateSelect})), "MM/dd/yyyy")
should give me the first day of the week for a given week as a string.
 
(and it appears to work).
 
 
thanks
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.033 seconds.