Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nulls in Formula don't seem to work - - -Help!!!

Status
Not open for further replies.

alexfromuno

Programmer
Nov 6, 2002
20
CR8.5 Pro
Oracle 8.1.5
CR ODBC drivers (I think)

Here’s my problem/misunderstanding.

I’m creating a report to show a Physical Exam for the doc’s I work for. Part of one of the sections is for General Notes. (There’s a Notes area for every section of the exam, but I’ll just talk about this only, since the ‘fix’ will be appropriate to all)

Under a report Header section b, I have the following code:
shared GenWell as string
shared GenNotes as string
.
GenWell = ""
GenNotes = ""

Under Details section , I have this code in a Field Object:
Rem
Rem - - General Section Definition- - - - - - - - - -
Rem
shared GenWell as string
shared GenNotes as string
.
if({SITE_DEFINED_FIELDS_VIEW.USER_FIELD_ID} = 1360) then
GenWell = {SITE_DEFINED_FIELDS_VIEW.SMALL_USER_FIELD_LOOKUP_VALUE}
end if

if({SITE_DEFINED_FIELDS_VIEW.USER_FIELD_ID} = 1407) then
GenNotes = {SITE_DEFINED_FIELDS_VIEW.SMALL_USER_FIELD_LOOKUP_VALUE}
end if

(When I look at the fields in question using TOAD, they show blank/null data)

When I execute the following code in a Report Footer than has Suppressed Visibility Checked:

if not(isnull({@showGenNotes})) and {@showPE} = 'No' then
false
else
true

…the line is question still shows up in the report….

Here’s the code for the formula above:

shared GenNotes as string
formula = GenNotes


Any idea what I‘m doing wrong????


PS.. Convert NULL field value to default has been tried both OFF and ON in both File>Options>Reporting & File>Report Options.



 
When setting a variable tosomething the code is
:=

you are missing your semicolon

if({SITE_DEFINED_FIELDS_VIEW.USER_FIELD_ID} = 1360) then
GenWell := {SITE_DEFINED_FIELDS_VIEW.SMALL_USER_FIELD_LOOKUP_VALUE}
end if
 
But, isn't that when using Crystal Syntax versus Basic Syntax? I'm using Basic.

alex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top