Print Page | Close Window

Record Selection Formula not filtering

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=7718
Printed Date: 02 May 2024 at 3:30am


Topic: Record Selection Formula not filtering
Posted By: Gremlin1708
Subject: Record Selection Formula not filtering
Date Posted: 17 Sep 2009 at 6:30am
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




Replies:
Posted By: Gremlin1708
Date Posted: 18 Sep 2009 at 12:15am
Hi all ...
 
I am glad to say that my problem was resolved.
please see the fix to my problem on the following link
 
https://forums.sdn.sap.com/thread.jspa?messageID=8179989&#8179989 - https://forums.sdn.sap.com/thread.jspa?messageID=8179989&#8179989
 
Good luck.
 
ClapClapClapClapClap



Print Page | Close Window