Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cross Tab or Alternative solution 2

Status
Not open for further replies.

CrystalMe

Programmer
Apr 2, 2010
2
0
0
US
Hi
I have a data like this:

Project Name: Account Date Hours Reported
P1 4/5/2010 (Mon) 6
P2 4/5/2010 (Mon) 2

P1 4/6/2010 (Tue) 5
P2 4/6/2010 (Tue) 3

I would like to create a report with this format:

Project Name Mon Tue Wed Thu Fri Sat Sun
P1 6 5
P2 2 3


Could you help me what method I should use.
I tried using CrossTab and insert it into Project as a Group and put crosstab on Group Footer but everytime the group change it gaps many spaces, I want it to be closely printed together. I also want to keep group title unchanged regardless whether any hours or not. Please help!. Thanks so much!



 
Use a formula of
ToText(DayofWeek({table.datefield}),0) + " " +
toText({Table.DateField},"ddd")

And use that as your column field. You need the first line to display 1,2,3, and get the sort sequence correct, and the second line to display Sun, Mon, Tue, Etc.


Editor and Publisher of Crystal Clear
 
Insert a crosstab and use Project as the row field, and for the column field use a formula:

dayofweek({table.date},crMonday)

While the column field is highlighted in the crosstab expert, select group options->options->customize name->use a formula and enter:

weekdayname(dayofweek({table.date}))

Place the crosstab in a report header or report footer section, not in the group section. If there are records for each day of the week somewhere in the report, all column labels will appear.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top