Error with columnvalues

Error in gathering column values to print to web report.

Parts of code:

dim rpttext as variant

Set entry = vc.GetNthEntry(i)

rpttext = entry.ColumnValues(2)

If Not(Isempty(rpttext)) Then

Print “ ”+Cstr(i)+“”+Cstr(rpttext(0))+“”

End If

Next i

On most entries the rpttext is returned as a variant with a container (0) but sometimes it is not…so the rpttext(0) fails…I can find no difference in the documents… Any ideas how to program around this difference or what may cause it?

The view is catagorized, but with three concatenated fields all with the same catagory choices.

Subject: Error with columnvalues

Hi,

do TypeName(rpttext) to find out what you’re dealing with. Or, if it can only be either an array, or a scalar and nothing else, you could do something like this:

dim rpttext as variant

Set entry = vc.GetNthEntry(i)

rpttext = entry.ColumnValues(2)

If Not(Isempty(rpttext)) Then

Dim text as String

If IsArray(rpttext) Then

text=CStr(rpttext(0))

Else

text=CStr(rpttext)

End If

Print “ ”+Cstr(i)+“”+text+“”

End If

Next i

Best regards
Mario Varchmin
http://www.e-llennium.de/e-llennium/index_en.htm