Crystal Reports Error: "Missing parameter field current value."

Discussion in 'Software' started by yasinirshad, Oct 4, 2007.

  1. yasinirshad

    yasinirshad

    Joined:
    Oct 4, 2007
    Messages:
    1
    Hi ,
    am getting this error."Missing parameter field current value." When i Use this line of code
    crReportDocument.DataDefinition.ParameterFields.ApplyCurrentValues() it says "ApplyCurrentValues is not a member of CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinition".How do i get rid of this error.
    Also is there anyway that without Exporting , i Can Print the Report from vb.net application directly using default Printer.
    Code is:
    Private Sub Btn_Export_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn_Export.Click
    Try
    Dim ConnInfo As New ConnectionInfo
    With ConnInfo
    .ServerName = "WASA00150"
    .DatabaseName = "iCalls"
    .UserID = "sa"
    .Password = "courage"
    End With
    Me.CrystalReportViewer1.ParameterFieldInfo.Clear()
    If Me.txtSTdate.Text.Trim.Length > 0 Then
    Me.CrystalReportViewer1.ReportSource = Server.MapPath("iCalls_CrystalReport_Department.rpt")
    Dim ParamFields As ParameterFields = Me.CrystalReportViewer1.ParameterFieldInfo
    Dim Per As New ParameterField
    Per.ParameterFieldName = "Period"
    Dim Period_Value As New ParameterRangeValue
    Period_Value.StartValue = Me.txtSTdate.Text
    Period_Value.EndValue = Me.txtCLdate.Text
    Per.CurrentValues.Add(Period_Value)
    ParamFields.Add(Per)
    End If
    For Each cnInfo As TableLogOnInfo In Me.CrystalReportViewer1.LogOnInfo
    cnInfo.ConnectionInfo = ConnInfo
    Next
    Me.CrystalReportViewer1.RefreshReport()
    CrystalReportViewer1.Visible = True
    Dim exportPath As String = "D:\SampleCrystalReports\iCalls_Export\test1.pdf"
    Dim crExportOptions As ExportOptions
    Dim crDestOptions As New DiskFileDestinationOptions
    crDestOptions.DiskFileName = exportPath
    crExportOptions = crReportDocument.ExportOptions
    crExportOptions.DestinationOptions = crDestOptions
    crExportOptions.ExportDestinationType = ExportDestinationType.DiskFile
    crExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat
    'crReportDocument.DataDefinition.ParameterFields.ApplyCurrentValues()
    crReportDocument.Export()
    Catch ex As Exception
    lblmsg.Text = ex.Message.ToString
    End Try
    End Sub
    Many Thanks.
    yasinirshad, Oct 4, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vincent
    Replies:
    0
    Views:
    1,420
    Vincent
    Apr 8, 2004
  2. OMNI GROUP

    CRYSTAL REPORTS/ CONTRACT/ NC

    OMNI GROUP, Jan 27, 2006, in forum: MCSE
    Replies:
    0
    Views:
    452
    OMNI GROUP
    Jan 27, 2006
  3. OMNI GROUP

    CRYSTAL REPORTS/ CONTRACT/ NC

    OMNI GROUP, Jan 27, 2006, in forum: MCSE
    Replies:
    4
    Views:
    532
    Kline Sphere
    Jan 30, 2006
  4. ZZZZZ
    Replies:
    0
    Views:
    431
    ZZZZZ
    Apr 28, 2004
  5. Shankar
    Replies:
    0
    Views:
    539
    Shankar
    Apr 17, 2007
Loading...

Share This Page