Values displaying issue

Printed From: Crystal Reports Book — Forum Name: Technical Questions

Hi,

I am having an issue running my Accounting Crystal Report, one of the fields is using a formula (called this formula as "Trans") as listed below:

IF isnull({Accounting.TransA}) THEN
   {Accounting.TransB} +' - '+{Accounting.TransC}
ELSE
    {Accounting.TransA} + ' - ' + {Accounting.TransD}

the issue is, when I run this accounting report, I am getting no data. So I did a trick or a test by going back to the above "Trans" formula and add (or edit) something like for example, add the comment sign (//comments) (see below)

//comments
IF isnull({Accounting.TransA}) THEN
   {Accounting.TransB} +' - '+{Accounting.TransC}
ELSE
    {Accounting.TransA} + ' - ' + {Accounting.TransD}


or adding space on top of the formula (see below)

space#1
space#2
IF isnull({Accounting.TransA}) THEN
   {Accounting.TransB} +' - '+{Accounting.TransC}
ELSE
    {Accounting.TransA} + ' - ' + {Accounting.TransD}

then click "Save and Closed" then I can see the value/data.

If I re run the report again, I will get the same issue (no data on report displayed), so I have to repeat the same trick I did like above and the report will show the data.

This happens every time when I run this report, so I have to keep repeating go back to the formula and do a trick like what I did in order the report to display the data.

Is this Crystal Reports version compatible or the service pack? I am using Crystal Reports SAP version 14.1.4.1327 service pack 4.

Anyone come across with this kind of issue before and how do you fix it?

Edited by CrystalGirl - 29 Mar 2019 at 4:38pm
I have not see this issue at all.  I know that checking for Nulls can be unpredictable (Set the formula editor to use Default Values for Nulls).  Also I trust using Len(string) = 0 instead of checking for a null.

IF len({Accounting.TransA})= 0 THEN
   {Accounting.TransB} +' - '+{Accounting.TransC}
ELSE
    {Accounting.TransA} + ' - ' + {Accounting.TransD}