[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 356
  • 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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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