• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 393
  • Last Modified:

Crystal Reports .NET RecordSelection Problem

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
 oCRTable.ApplyLogOnInfo(oCRTableLogonInfo)
Next
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,
Denise
 
0
DeniseGoodheart
Asked:
DeniseGoodheart
  • 2
  • 2
2 Solutions
 
mlmccCommented:
Are you passing a value to the parameter?

mlmcc
0
 
DeniseGoodheartAuthor Commented:
Hello,

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

  rptQuoteAudit.SetParameterValue(0, sQuote)

Thank You,
Denise
0
 
DeniseGoodheartAuthor Commented:
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.
0
 
mlmccCommented:
YOur request is accurate.  Just let the DELETE request process.

mlmcc
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now