Help - Search - Members - Calendar
Full Version: what am I doing wrong
Fast Reports forum > Fast Reports Products > FastScript
DavidWard
this simple script works perfectly:

Private Sub Text10_BeforePrint(ByVal sender As object, ByVal e As EventArgs)
REM Primary
Dim This As String
Dim Current As String

Current=Text10.Text
This=String.Concat("Primary Securing: ",Current)
Text10.Text=This
REM MsgBox(Text10.Text)
End Sub

this almost equally simple one does not!

Private Sub Text11_BeforePrint(ByVal sender As object, ByVal e As EventArgs)
REM Primary
Dim This As String
Dim Current As String

Current=Text11.Text
REM MsgBox(Current)

IF CHR(ASC(Current))="P" THEN
This="Condition: (X) Pass ( ) Fail"
END IF

IF CHR(ASC(Current))="F" THEN
This="Condition: ( ) Pass (X) Fail"
END IF

Text11.Text=This
End Sub

when I (un)REM the MsgBox line in Text11_BeforePrint, it shows "[Table2.Pass_Fail]", which, is the SQL fieldname I have assigned to Text11.Text, I would have expected it to reflect the "contents" of that field.

That said, when I (un)REM the MsgBox line from Text10_BeforePrint it also shows the [Table.fieldname] assignment rather than the field content.

Can anyone tell me what I am doing wrong?
DavidWard
QUOTE(DavidWard @ Dec 20 2011, 09:47 AM) *
Can anyone tell me what I am doing wrong?


never mind I have sorted it out, all is good now.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.