Tips and Tricks
 Crystal Reports Forum : Crystal Reports .NET 2003 : Tips and Tricks
Message Icon Topic: Way to display string when field of int type null Post Reply Post New Topic
Author Message
DDSJ
Newbie
Newbie


Joined: 18 Aug 2021
Online Status: Offline
Posts: 12
Quote DDSJ Replybullet Topic: Way to display string when field of int type null
    Posted: 23 Aug 2022 at 1:42am
Is there any approach to display 'NA' in place of blank when Field of numeric type is null in database. I do not want to convert the field type to char type using user formula as the requirement is to use the numeric type in other formulas. However I want to display 'NA' if the filed value is null or blank in database. Is there any way to achieve it ?

Please help

Thanks

Edited by DDSJ - 23 Aug 2022 at 1:43am
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 23 Aug 2022 at 3:55am
in a formula. You can for display purposes convert the number to a string.  That way you can display the NA.  I.e., if isnull(fieldvalue) the 'NA' else cstr(fieldvalue)
IP IP Logged
DDSJ
Newbie
Newbie


Joined: 18 Aug 2021
Online Status: Offline
Posts: 12
Quote DDSJ Replybullet Posted: 02 Sep 2022 at 12:59am
The difficulty is that I cannot convert number to string in formula field as I have to display the report in multiple languages and my formulas have calculations which fails if I convert number to text. So is there any way to provide border or lines on field when value of field is null if to display NA is not possible. Either way will work.(NA or border around null)
Please help

Thanks in advance


Edited by DDSJ - 02 Sep 2022 at 1:01am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 02 Sep 2022 at 8:25am
Here a trick you could use:

Have 2 fields the same size and the same location. If the value is null, hide one and display the field/cell with NA in it. When it is not null, hide the NA cell and display the calculation results.

if there are a lot of calculated cells, this can be tedious...

HTH
IP IP Logged
DDSJ
Newbie
Newbie


Joined: 18 Aug 2021
Online Status: Offline
Posts: 12
Quote DDSJ Replybullet Posted: 05 Sep 2022 at 4:11am
This solution worked for me.
Thankyou so much for the support.
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.