Hi All...
Recently i Upgraded my Crystal Reports R2 from Service pack 1 to ServicePack 4 but so far i am regretting it all the way. I hope that you guys can please help me with some answers as to this question.
Previously the report worked 100% but since i upgraded it looks like the Record Selection Formula does not get send through to the reportDocument anymore. Can you please help me and tell me how i can fix this problem. When the report displays on the page i see all the info in the database since day 1.
My Settings looks as follow.
Development PC:
Operating System : Windows XP
Development Enviroment : Visual Studio 2005 (VB.Net)
Crystal Reports Version : CR XI R2
Application Type : Desktop Application
Code:
'Global Variable Declaration
Public
rd As New ReportDocument
'Function that generates the Selection Formula and display the report
Public Sub BuildReport()
Try
Dim sSql As String = ""
Select Case Me.sFunction
Case "GoodsRecievedNote"
sSql =
"{tblGoodsRecievedNotes.GoodsRecievedNoteNumber}='" & sDocNumber & "'"
Cursor = Cursors.WaitCursor
rd.Load(Path.GetFullPath(Application.StartupPath &
"\rptGoodsRecievedNote.rpt"))
rd.RecordSelectionFormula = sSql
rd.Refresh()
Case "Quotation"
sSql =
"{tblQuotations.QuoteNumber}='" & sDocNumber & "'"
Cursor = Cursors.WaitCursor
rd.Load(Path.GetFullPath(Application.StartupPath &
" \rptQuotation.rpt"))
rd.RecordSelectionFormula = sSql
rd.Refresh()
End
Select
Me.crView.ReportSource = rd
Me.crView.Zoom(85)
Cursor = Cursors.Arrow
Catch ex As Exception
ReportError(ex.ToString, Err.Description)
End Try
End Sub