Paremeter not send into Crystal Report-VBForums
Results 1 to 1 of 1

Thread: Paremeter not send into Crystal Report

  1. #1

    Thread Starter
    Addicted Member Tengkorak's Avatar
    Join Date
    Nov 2006
    Posts
    239

    Paremeter not send into Crystal Report

    Hello All,

    i have problem when make report in VB 2008 with crystal report, the problem is that parameter from VB not send into crystal report.
    here some line my code:
    Code:
            Dim p As New ParameterValues
            Dim ps As New ParameterDiscreteValue
            '   ps.Value = Date.Now
            ps.Value = dt1.Value.Date
            p.Add(ps)
            cryRpt.DataDefinition.ParameterFields("dt1").ApplyCurrentValues(p)
           
    
            ps.Value = dt2.Value.Date
            p.Add(ps)
            cryRpt.DataDefinition.ParameterFields("@dt2").ApplyCurrentValues(p)
    
    
            Dim strSQL As String = "select * from order_list " & _
     "where transdate between #" & dt1.Value.Date & "# and #" & dt2.Value.Date & "# order by transdate"
    
            Dim Connection As New OleDbConnection(strConn)
    
            Dim d As New OleDbDataAdapter(strSQL, Connection)
    
            Dim DS As New DataSet '(DataSet1 is the typed dataset)
    
            d.Fill(DS, "DSLapPendaftaran")
    
    
    
            cryRpt.SetDataSource(DS.Tables("DSLapPendaftaran"))
    
            'Dim ds As New DataSet
    
    
            frmReportViewer.CRV.ReportSource = cryRpt
            frmReportViewer.Show()
    when i press print button always like image
    Attached Images Attached Images  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.