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

Count Null Column

Status
Not open for further replies.

MaumeeScott

Technical User
Jan 29, 2004
25
US
What would be the best way to count and display the number of null fields on a record?

Thanks!
 
You can use the following Actuate Basic functions or Component methods to count the number of NULL datarow variables.

1. GetVariableCount(DataRow) -- to find the number of datarow variables.
2. Function GetValue( index As Integer ) As Variant of the datarow.
3. IsNull(<expr>).

*****
Dim i as integer
Dim nulCount as Integer

For i = 1 to GetVariableCount(Fetch)
if IsNull(Fetch.GetValue(i)) then
nulCount = nulCount + 1
end if
Next I
*****

You can use the above code in the Fetch method of the datastream and save the nulCount value in a datarow variable to be used later.

I hope this helps.

-- JB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top