Home
Crystal Reports Training
Crystal Reports XI
Crystal Reports .NET
Crystal Reports Forum
News
Tech Support
Active Topics
Memberlist
Search
Help
Register
Login
Report Design
Crystal Reports Forum
:
Crystal Reports 9 through 2022
:
Report Design
Topic: Null Data and Time field
Author
Message
roxaneamanda
Newbie
Joined: 10 Aug 2009
Location: United Kingdom
Online Status: Offline
Posts: 23
Topic: Null Data and Time field
Posted: 14 Apr 2010 at 1:40am
Hi,
I have a list of dates and times;
Created
Completion date
12/04/2010 13:10
12/04/2010 13:12
12/04/2010 16:43
12/04/2010 13:16
13/04/2010 11:21
12/04/2010 13:19
12/04/2010 13:32
12/04/2010 13:34
I want to add a format, display string to the completion date field which will display 'Open Incident' if the completion date isnull.
I tried the following within the format, display string but I get an error stating the second {table.datetimefield} 'a string is required here'
if isnull ({table.datetimefield}) then 'Open Incident' else {table.datetimefield}
HELP????
IP Logged
FrnhtGLI
Senior Member
Joined: 22 May 2009
Online Status: Offline
Posts: 347
Posted: 14 Apr 2010 at 2:08am
There's probably a better way to do it, but I've always layered up on fields to acheive something like this when necessary.
Behind the original field have a formula field that is:
if isnull({table.datetimefield}) then 'Open Incident'
else ""
That should get you what you want.
Edited by FrnhtGLI - 14 Apr 2010 at 2:09am
|< /\ '][' ( )
IP Logged
roxaneamanda
Newbie
Joined: 10 Aug 2009
Location: United Kingdom
Online Status: Offline
Posts: 23
Posted: 14 Apr 2010 at 2:16am
Thanks, that's good enough for me!!
IP Logged
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 14 Apr 2010 at 3:42am
For future reference you just need to make the fields the same data type:
if isnull ({table.datetimefield}) then 'Open Incident'
else
totext({table.datetimefield})
You can also further define the way the string appears by adding that as a condition in the totext() conversion. As an example...
totext({table.datetime},'dd/MM/yy h:mm:ss tt')
Edited by DBlank - 14 Apr 2010 at 3:43am
IP Logged
Printable version
Forum Jump
-- Select Forum --
Announcements
Talk with the Author
Self-Publishing
Job Postings
New feature request
Report Design
Data Connectivity
Technical Questions
Tips and Tricks
Crystal Xcelsius
Report Design
Data Connectivity
Writing Code
Tips and Tricks
Report Design
Data Connectivity
Writing Code
Tips and Tricks
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
HOME
|
FREE EBOOK
|
PROGRAMMING GUIDE
|
PURCHASE
|
REVIEWS
|
CONTACT ME
|
FAQ
|
LINKS
|
PRIVACY
|
CLICK PLAYS
|
KONACAD
© 2004-2026 Brian Bischof. All Rights Reserved.