Display variable value in Crystal Report Text Box

rpk2006
10-13-2004, 01:51 AM
In my application I have certain calculated values stored in variables. I am using Visual Basic 6 and Crystal Reports 8.5 and my Report has certain Text Boxes where I want to display the calculated values. I don't want to use the Data Fields. I want to do like this:


Dim C as ...CrystalReport1
Dim var1, var2 As String

Set C = New CrystalReport1

C.txtName.Text = var1
C.txtNumber.Text = var2


But the Crystal Report displays an error at lines "C.txtName", saying that it is a Read-Only field.

Harkon
10-13-2004, 02:17 AM
try

C.txtName.SetText var1
C.txtNumber.SetText var2

rpk2006
10-13-2004, 01:21 PM
Thanks a lot, it did as I want.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum