Print Page | Close Window

Formula trouble

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22992
Printed Date: 18 Apr 2024 at 3:39pm


Topic: Formula trouble
Posted By: anoble1
Subject: Formula trouble
Date Posted: 05 Jan 2022 at 7:27am
I have 2 types of invoices this is looking at evidently. One of them doesn't even have a SPCD field at all tied anywhere. I need the program to look at the SPCD field first though because the majority of the records have this listed first (Zipcode). How can I tell the program to skip over the SPCD if there is no record and go to the CMASSH.CS_PCD?

IF (TRIM({MNBDM.BM_SPCD}))<>"" AND not isnull({MNBDM.BM_SPCD}) then
{MNBDM.BM_SPCD} else
{CMASSH.CS_PCD}



Replies:
Posted By: lockwelle
Date Posted: 06 Jan 2022 at 11:26am
As DBlank says:
Always check ISNULL first. If the value is null, in this case, Crystal will throw an error and not tell you.

Try checking ISNULL first and then <> "" and see if that helps.

HTH



Print Page | Close Window