Crystal Reports .NET RecordSelection Problem

Posted on 2009-02-20
Last Modified: 2013-12-17
Good Day:

I am using VS.NET 2005 with Crystal Reports.NET.  I created a RecordSelection as follows {spSelQuoteAudit;1.QuoteNumber} = {?@QuoteNumber} within the .NET Crystal Reports interface.  I tested my stored procedure and it works fine but it is not working in my Crystal Report code.  

Private Sub CreateReport()
Dim rptQuoteAudit = New rptQuoteAudit11
Dim oCRDb As CrystalDecisions.CrystalReports.Engine.Database = rptQuoteAudit.Database
Dim oCRTables As CrystalDecisions.CrystalReports.Engine.Tables = oCRDb.Tables

Dim oCRTable As CrystalDecisions.CrystalReports.Engine.Table
Dim oCRTableLogonInfo As CrystalDecisions.Shared.TableLogOnInfo
Dim oCRConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo()
oCRConnectionInfo.DatabaseName = oCon.sCRDatabase
oCRConnectionInfo.ServerName = oCon.sCRServer
oCRConnectionInfo.UserID = oCon.sCRLoginID
oCRConnectionInfo.Password = oCon.sCRPassword

For Each oCRTable In oCRTables
 oCRTableLogonInfo = oCRTable.LogOnInfo
 oCRTableLogonInfo.ConnectionInfo = oCRConnectionInfo
Dim sQuote As String = frmQuote.txtQuote.Text
rptQuoteAudit.RecordSelectionFormula = "{spSelQuoteAudit;1.QuoteNumber}='" & sQuote & "'"
With Me.crvQuoteAudit
     .ReportSource = rptQuoteAudit
 End With
End Sub

Any Suggestions?
Thank You,
Question by:DeniseGoodheart
    LVL 100

    Assisted Solution

    Are you passing a value to the parameter?


    Accepted Solution


    My parameter is sQuote and I got it to work by doing the following

      rptQuoteAudit.SetParameterValue(0, sQuote)

    Thank You,

    Author Comment

    I do not know what happened, but I meant to give mlmcc points.  I suppose I should have not answered a co-workers question while awarding points. Although I already figured out the answer by the time mlmcc answered my question; he should get the points because it was a parameter issue.
    LVL 100

    Expert Comment

    YOur request is accurate.  Just let the DELETE request process.


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    This video discusses moving either the default database or any database to a new volume.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now