PDA

Click to See Complete Forum and Search --> : Record select error


yousufkhan
Oct 31st, 2007, 06:19 AM
while designing crystal report i had set the record selection formula in the crystal report 7 before calling it form vb6 i have cleared that selectio formula from the crystal report and pasing it at run but it is showing error

Error in formula (Record_Selection>

'
'
The remaining text does not appear to be part of the formul

this is always happening when i use give the fomula at design time so that i can easily but the rpt dosnt work when i call from vb6 passing the same formula at the run time what could be the problem

brucevde
Oct 31st, 2007, 09:54 AM
Post your code.

yousufkhan
Oct 31st, 2007, 11:07 PM
Problem is not with code actualy
while designing i had set the selecttion formula like this

{Folio.FolioNo}=2 in the crystal reports edit record selection formula


Dim StrPrint As String
Dim StrPrintFor As String
StrPrint = MsgBox("Do you want print bill of Room No. : " & txtroomno.Text, vbYesNo, "CheckOut")
If StrPrint = vbYes Then
CrBill.Reset
CrBill.ReportFileName = App.Path & "\FinalBill-Test.rpt"
txtFolno.Text = 11
StrPrintFor = "{Folio.FolioNo}=2"
CrBill.SelectionFormula = StrPrintFor
CrBill.WindowState = crptMaximized
CrBill.Destination = crptToWindow
CrBill.Action = 0
End If