Print Page | Close Window

Values displaying issue

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22752
Printed Date: 03 May 2024 at 5:15pm


Topic: Values displaying issue
Posted By: CrystalGirl
Subject: Values displaying issue
Date Posted: 29 Mar 2019 at 4:15pm
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?



Replies:
Posted By: kevlray
Date Posted: 01 Apr 2019 at 3:51am
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}



Print Page | Close Window