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:
when i press print button always like imageCode: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()


Reply With Quote