Skip to Content
0
Former Member
Mar 27, 2015 at 02:17 PM

Hello I am getting the error 'this field name is not known' when I am trying get any value from a view field in crystal reports 11 from VB .net 2010.

586 Views

Hello I am getting the error 'this field name is not known' when I am trying get any value from a view field in crystal reports 11 from VB .net 2010.

I am trying to get value from a field name inside a formula. I tried both in Crystal syntax as well as in Basic Syntax.

I tried to give value in the formula text also in the VB .Net code. It takes only strings in the .Net code.

formula code in VB .Net

Dim x as date

If {@PI} = "PI" Then

x = DateValue({VIEW_GROUP_TOTALS.CH_PI_OPEN_DATE})

else

If IsNull({VIEW_GROUP_TOTALS.CH_OPEN_DATE}) Then

x = DateValue({VIEW_GROUP_TOTALS.CH_PI_OPEN_DATE})

else

x = DateValue({VIEW_GROUP_TOTALS.CH_OPEN_DATE})

End If

End If

formula = x

I tried using single quote like this DateValue("'{VIEW_GROUP_TOTALS.CH_PI_OPEN_DATE}'") - tried all possibilities but in vein.

In crystal syntax i tried the following.

dateVar x:=CDate({VIEW_GROUP_TOTALS.CH_PI_OPEN_DATE});

If {@PI} = "PI" Then x = CDate({VIEW_GROUP_TOTALS.CH_PI_OPEN_DATE});

- I am getting the same error.

The error is

This field name is not known.

Details:errorKind

Error in File Case_Group_Manager

{69687C0B-2A67-406D-9E3B-CDD25E93A974}.rpt

Error in formula EntryDate:

'dateVar x:=CDate({VIEW_GROUP_TOTALS.CH_PI_OPEN_DATE});

'

This field name is not known.

Details: errorKind

Please help.

Thank you

Attachments