Print Page | Close Window

Changing Crosstab Frequency

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Writing Code
Forum Discription: .NET programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=176
Printed Date: 27 Apr 2024 at 9:17pm


Topic: Changing Crosstab Frequency
Posted By: jpavlik
Subject: Changing Crosstab Frequency
Date 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.
 
 



Replies:
Posted By: BrianBischof
Date 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>


Posted By: jpavlik
Date Posted: 31 Jan 2007 at 12:12pm
I see - so
 
CStr(CDate(DateAdd("d", -(DatePart("w", mailto:%7b@RoomViewDateSelect - {@RoomViewDateSelect }) - 1), mailto:%7b@RoomViewDateSelect - {@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



Print Page | Close Window