Notices

Great community. Great ideas.

Welcome to ASP/Free, a community dedicated to helping beginners and professionals alike in improving their knowledge of Microsoft's development and administration technologies. Sign up today to gain access to the combined insight of tens of thousands of members.

Thread: Error:Missing parameter field current value in Crystal Reports using vb.net

Results 1 to 2 of 2
Share This Thread →
  1. #1
    yasinirshad is offline Contributing User
    Join Date
    Jul 2007
    Posts
    166
    Rep Power
    0

    Error:Missing parameter field current value in Crystal Reports using vb.net

    Hi ,
    am getting this error."Missing parameter field current value." Please help me resolve this.. When i Use this line of code
    Code:
    crReportDocument.DataDefinition.ParameterFields.ApplyCurrentValues()
    it says "ApplyCurrentValues is not a member of CrystalDecisions.CrystalReports.Engine.ParameterFi eldDefinition".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:
    Code:
    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.Export()
            Catch ex As Exception
                lblmsg.Text = ex.Message.ToString
            End Try
        End Sub
    Many Thanks.
    Faq

  2. #2
    jmurrayhead is offline Moderator
    Join Date
    Feb 2004
    Location
    Reston, VA
    Posts
    13,248
    Rep Power
    1907
    You've already asked this question here: http://forums.aspfree.com/net-develo...ng-190253.html

    Thread Closed.
    jmurrayhead
    Faq

Share This Thread →

Become Part of This Conversation

Join NowFor Free!

Similar Threads

  1. export reports created using Crystal reports 8.5 to MS Excel
    By csillagyitzik in forum Visual Basic Programming
    Replies: 1
    Last Post: December 6th, 2005, 10:02 AM
  2. Rocord numbers in crystal reports........
    By starazam in forum .NET Development
    Replies: 0
    Last Post: January 5th, 2005, 12:48 AM
  3. Crystal reports 9 parameter problem
    By Ruske in forum Programming Help
    Replies: 0
    Last Post: March 2nd, 2004, 08:59 AM
  4. Replies: 0
    Last Post: December 3rd, 2003, 12:39 AM
  5. Crystal Report parameter error
    By Steve Schofield in forum ASP Development
    Replies: 0
    Last Post: July 31st, 2002, 04:57 PM

ASP Free Advertisers and Affiliates