C# .NET - Suppressing fields in crystal report

Asked By sreya gopal on 06-Mar-12 07:16 AM
In crystal report i'm displaying time in one field like   7:30:42.  How can i suppress the field if the value is like   0:00:00
Somesh Yadav replied to sreya gopal on 07-Mar-12 12:05 AM
Hi,

http://crystaltricks.com/wordpress/?p=144

Here’s a look at how it works. (Where timefield= 4:15:00 p.m.)

 
 

Example

Result

ToText({timefield}, “HH:mm:ss tt”)

“16:15:00 PM” (default)

ToText({timefield}, “HH:mm:ss tt”, “morning”, “night”)

“16:15:00 night”

ToText({timefield}, “hh:mm:ss t”, “am”, “pm”)

“04:15:00 p”

 
For more information refer to the below link.

http://crystaltricks.com/wordpress/?paged=2

Hope it helps you.
[)ia6l0 iii replied to sreya gopal on 14-Mar-12 01:00 AM
Use the CSTR function or the ToText function and conditionally check the converted value. If it is not "00:00:00" then you can choose not to display it. 

Alternatively, you can return null's from your query.