Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Crosstab? Adding dates.. Post Reply Post New Topic
Author Message
jbalbo
Senior Member
Senior Member
Avatar

Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Quote jbalbo Replybullet Topic: Crosstab? Adding dates..
     Posted: 17 Jul 2013 at 10:56am
Hi

Doinga  crosstab report with grouping on client name and starttime which is a datetime
basing report on one month 1st thru last day and the value of a code am pm or am pm depending if they had two starttimes that day one in the am one in the pm .

Question is sone clients only have data for certains days on the month I would like ti display 1 thru last day with blanks on days without codes

example looks like this
                 
Client AA  3     4     5    7
                AM  pm  pm  am

I would like it to look like this
               1    2   3     4   5    6   7
Client AA            AM pm pm     am

Thanks

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Jul 2013 at 11:00am
best way is to use another table that has a row per date (basically a calendar table), left join to it and use your select statement to use the dates from that table instead of your client table.
IP IP Logged
jbalbo
Senior Member
Senior Member
Avatar

Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Quote jbalbo Replybullet Posted: 17 Jul 2013 at 11:29am
Thanks for the help...
Can I join on  datetime fields using just the datepart if the report is using table linking?

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Jul 2013 at 11:54am

I think you would need o strip out the time (or set it to midnight) and join on that.

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