Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
| Search | Today's Posts | Mark Forums Read
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 16th, 2004, 05:50 PM
Registered User
 
Join Date: Nov 2004
Location: New Castle, DE, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Null Value for Date/Time Field

I am attempting to build an report that shows the number of tickets submitted during each half hour interval of the day. I created a formula that pulls out the interval each ticket falls under. However, now I need the show '0' for those intervals where no tickets were submitted. I have tried this:

If isnull({Date.Field}) then 0 else
Time (Hour ({SRG_Ticket_Information_Customer.CompleteDate})
& ':'&
iIf( minute ({SRG_Ticket_Information_Customer.CompleteDate}) < 30, '00' ,'30'))

I get the error:
A number is required here.

Also,
Once I get this formula correct, I need the number of tickets assigned, Completed and Finished all grouped by each 48 half hour intervals of the day. I have been thinking once I get this formula, I can pull everything into Access and build a Crystal report from the queries.

Please HELP!


 
Old November 16th, 2004, 06:36 PM
Authorized User
 
Join Date: Jul 2003
Location: Juarez, Chihuahua, Mexico.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Tere
Default

What happen here is that you try to return two different type of data with the same funtion.
Why don't you try '0' instead of 0:
If isnull({Date.Field}) then '0' else

 
Old November 17th, 2004, 11:58 AM
Registered User
 
Join Date: Nov 2004
Location: New Castle, DE, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

When I did this, I received a message that a number was required.

if isnull({SRG_Ticket_Information_Customer.CompleteDa te}) then '0 '
else
Time (Hour ({SRG_Ticket_Information_Customer.CompleteDate})
& ':'&
iIf( minute ({SRG_Ticket_Information_Customer.CompleteDate}) < 30, '00' ,'30'))








Similar Threads
Thread Thread Starter Forum Replies Last Post
null date time dhoward VB.NET 2002/2003 Basics 1 June 15th, 2007 02:48 PM
setting date/time fields back to null value badgolfer Access 1 August 8th, 2005 02:29 AM
entering Null value for Date field jordancrandall Access ASP 1 January 12th, 2005 01:29 PM
SQL2000 Date/Time field update Lucian Ion Dreamweaver (all versions) 9 January 2nd, 2004 09:14 PM
Format Date to time field KennethMungwira VB.NET 3 November 17th, 2003 11:48 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.