locked
Passing Parameters to Crystal Report (Pull) RRS feed

  • Question

  • User-1398979467 posted

    Can anyone help me in the right direction of passing a date parameter to the crystal report. Here is what i have now in my code-behind. The report in still asking to provide the value of the parameter after it loads ? greatly appreciated 


      Dim ConnInfo As New ConnectionInfo
                With ConnInfo
                    .ServerName = "CONDOR\IBIS"
                    .DatabaseName = "EDS"
                    .UserID = "Eds"
                    .Password = "Eds"
                End With
    
                ' parameter filed, must match with parameter in the report
                Me.CrystalReportViewer1.ParameterFieldInfo.Clear()
                CrystalReportViewer1.ReportSource = "reports/Charges/" & ddlReports.SelectedItem.Text & ".rpt"
                Dim ParamFields As ParameterFields = Me.CrystalReportViewer1.ParameterFieldInfo
    
                Dim p_dept As New ParameterField
                p_dept.Name = "date"
                Dim p_EmpID_Value As New ParameterDiscreteValue
                p_EmpID_Value.Value = "2010-10-24 00:00:00.000"
                p_dept.CurrentValues.Add(p_EmpID_Value)
                ParamFields.Add(p_dept)
    
                CrystalReportViewer1.Visible = True
                CrystalReportViewer1.RefreshReport()
    
               
                For Each cnInfo As TableLogOnInfo In Me.CrystalReportViewer1.LogOnInfo
                    cnInfo.ConnectionInfo = ConnInfo
                Next



    Thursday, October 28, 2010 3:19 PM

Answers

  • User2022958948 posted

    Please use Parameter Field.Add to new parameter to report with the special value

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, November 4, 2010 11:51 PM

All replies

  • User-1398979467 posted

    Ok so i can pass the parameter ... now how do i get that parameter to work with paging ? When i try to goto the next page it says "The Parameter is incorrect"

    Thursday, October 28, 2010 6:14 PM
  • User2022958948 posted

    Please use Parameter Field.Add to new parameter to report with the special value

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, November 4, 2010 11:51 PM