Hi All,
Going out of my friggin mind trying to work this bloody thing out. Appreciate any help. I've searched everywhere but suspect I probably don't know the right keywords because this is so easy and I shouldn't be finding it so hard.
Using win xp, sp2, vb 6, crystal 10
referencing craxdrt
All I am trying to do is check to see if the stupid report object in my report is a date field. How hard can it be?
My code so far:
Declarations
Loop
So the line that says:
is not returning the right value. ValueType is returning 16, crDateTime return 10 so I'm either using the wrong method or the wrong enum or everything is wrong. Anyone know the answer to this?
thanks
lfb
Going out of my friggin mind trying to work this bloody thing out. Appreciate any help. I've searched everywhere but suspect I probably don't know the right keywords because this is so easy and I shouldn't be finding it so hard.
Using win xp, sp2, vb 6, crystal 10
referencing craxdrt
All I am trying to do is check to see if the stupid report object in my report is a date field. How hard can it be?
My code so far:
Declarations
Code:
Dim CRXSections As CRAXDRT.Sections
Dim CRXSection As CRAXDRT.Section
Dim CRXReportObjects As CRAXDRT.ReportObjects
Dim CRXReportObject As Object
Loop
Code:
For Each CRXSection In CRXSections
Set CRXReportObjects = CRXSection.ReportObjects
For Each CRXReportObject In CRXReportObjects
'check to make sure it is a field object
If CRXReportObject.Kind = crFieldObject Then
'check to see if it is a date field
If CRXReportObject.Field.ValueType = crDateTime Then 'how do you do this part???? This check doesn't work!
CRXReportObject.DateOrder = crMonthDayYear
End If
End If
Next CRXReportObject
Next CRXSection
So the line that says:
Code:
If CRXReportObject.Field.ValueType = crDateTime
is not returning the right value. ValueType is returning 16, crDateTime return 10 so I'm either using the wrong method or the wrong enum or everything is wrong. Anyone know the answer to this?
thanks
lfb