Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Crosstab Report = how to handle date rows Post Reply Post New Topic
Author Message
dfolzenlogen
Newbie
Newbie
Avatar

Joined: 23 Feb 2008
Location: United States
Online Status: Offline
Posts: 36
Quote dfolzenlogen Replybullet Topic: Crosstab Report = how to handle date rows
     Posted: 14 Aug 2008 at 10:17am
Hello.  I am hoping someone can help me with a crosstab report.  I have a crosstab report with the columns being the status of Bank Drafts which are due (Paid; On Hold - Title Problem; WO on Title Clearance; Being Reviewed, etc).  The rows are the actual due dates of the Bank Drafts.  The Due Date of the Bank Drafts is based on a 30 day period which tolls from the date the draft is submitted to the client's bank.  Here's my dilema:  of the 700 potential Bank Drafts -- only 400 or so have been submitted.  The due date for the files for which we do not have a Bank Draft show up at the top of the report and the row info (date) is blank.  How can I set up something in the crosstab report so that if the Draft Due Date is null that it returns text that says "Draft Not Submitted" since this is a date field.  I would appreciate any suggestions.  Thanks.
IP IP Logged
themessenger
Groupie
Groupie
Avatar

Joined: 15 Aug 2008
Location: United Kingdom
Online Status: Offline
Posts: 48
Quote themessenger Replybullet Posted: 15 Aug 2008 at 2:57am
Create a formula field like:

If isnull({DraftDueDate}) = true then "Draft Not Submitted" else ToText({DraftDueDate})

and use this instead of the database field in the cross-tab.
Managing Director
www.allmymenus.com
IP IP Logged
dfolzenlogen
Newbie
Newbie
Avatar

Joined: 23 Feb 2008
Location: United States
Online Status: Offline
Posts: 36
Quote dfolzenlogen Replybullet Posted: 15 Aug 2008 at 6:00am
Thank you for your help.  That worked as far as getting the "No Draft Submitted" but my dates are not sorting correctly.  The original date is in DateTime format.  How can I force the format of the text so that it is in mm/dd/yy order and, thus, sort correctly when converted to text?  Any suggestions.
IP IP Logged
themessenger
Groupie
Groupie
Avatar

Joined: 15 Aug 2008
Location: United Kingdom
Online Status: Offline
Posts: 48
Quote themessenger Replybullet Posted: 15 Aug 2008 at 6:06am
No problem.  Try this:

If isnull({DraftDueDate}) = true then "Draft Not Submitted" else ToText({DraftDueDate},"MM/dd/yy")

Edited by themessenger - 15 Aug 2008 at 6:06am
Managing Director
www.allmymenus.com
IP IP Logged
dfolzenlogen
Newbie
Newbie
Avatar

Joined: 23 Feb 2008
Location: United States
Online Status: Offline
Posts: 36
Quote dfolzenlogen Replybullet Posted: 15 Aug 2008 at 9:00am
Worked like a charm!!
 
I had tried the same thing but was using "mm/dd/yy" (lowercase "mm" not uppercase "MM") and was getting weird results.
 
Appreciate the help!  Hope I can offer assistance to you sometime!!
 
Thanks.
IP IP Logged
themessenger
Groupie
Groupie
Avatar

Joined: 15 Aug 2008
Location: United Kingdom
Online Status: Offline
Posts: 48
Quote themessenger Replybullet Posted: 15 Aug 2008 at 2:12pm
Anytime - glad to help.

mm - minutes, MM - month

I got caught out by that one a while back :)
Managing Director
www.allmymenus.com
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