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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display an string when a field is null

Status
Not open for further replies.

t16turbo

Programmer
Mar 22, 2005
315
0
0
GB
hi there,
I am writing a report that lists all projects that have certain information that has not been populated.
There are 7 fields, and the SQL uis a simple SELECT <all 7 fields> FROM <table> WHERE <fied 1 IS NULL OR field 2 IS NULL etc>

What I want to be able to do is show "NULL" where a field is blank, or highlight the field a certain colour.
any suggestions?

 
Hi,

Change the SQL to:

Select nvl(<field1>,'NULL'),nvl(<field2>,'NULL'),nvl(<field3>,'NULL'),(<field4>,'NULL'),(<field5>,'NULL'),(<field6>,'NULL'),(<field7>,'NULL') FROM <table> WHERE <field1 IS NULL etc>

Pete
 
Hi,

Or you could override the OnRow event of each of the <field1-7> controls. Somthing like:

Sub OnRow( row As AcDataRow )
Super::OnRow( row )
if IsNull(row.getvalue("<field1>")) then
font.color=Red
end if
End Sub

Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top