Skip to Content
Former Member
Mar 28, 2007 at 07:23 PM

Parameters not being passed from 2005


Post Author: Paul Mitton

CA Forum: .NET


I have a 2005 app that I am trying to pass parameters to several embedded crystal reports. None of them receive the parameters and the report always prompts for the parameters to be entered.

Product: Crystal Reports Professional

Version: XI

Patches Applied: Recent new download

Operating System(s): XP Pro / Visual Studio 2005 Pro

Database(s): SQL 2000/2005

Error Messages: NoneSteps to Reproduce: Below is a sample of the VB code used to call the crviewer. The commented out code is various methods used to try and pass the parameter.

Private Function btnSOPCommission_Print()

SOPCommissionReport = New SOPCommission()

'Dim pvCompanyName As ParameterDiscreteValue = New ParameterDiscreteValue()

'pvCompanyName.Value = "City"

'Me.DriverStatementsReport.SetParameterValue("CompanyName", pvCompanyName)

Me.SOPCommissionReport.SetParameterValue(0, "City")


Me.crvReportViewer.ReportSource = Me.SOPCommissionReport

'Dim crvparaCompanyName As ParameterField

'Dim crvparadvCompanyName As ParameterDiscreteValue = New ParameterDiscreteValue()

'crvparaCompanyName = Me.crvReportViewer.ParameterFieldInfo("CompanyName")

'crvparadvCompanyName.Value = "City Wide"


Me.crvReportViewer.Visible = True


Return True

End Function

Thanks for any help