from CrystalReport : Any dates that are being passed to Crystal Reports must be in Crystal Reports Date format, Date(yyyy,mm,dd).
MsSQL server and Crstal report, have diffrent format data.
so please use this one:
Private Sub Command1_Click()
CrystalReport1.Connect = "ODBC;driver=SQLSERVER;" & "UID=sa;pwd=password;server=server_name;DATABASE=database_name"
CrystalReport1.ReportFileName = App.Path & "\REPORT\report111.rpt"
Qry = "{Transaksi.Tanggal} >= " & Format(DTPicker1, "\Date(yyyy,mm,dd)") & " " _
& "And {Transaksi.Tanggal} <= " & Format(DTPicker2, "\Date(yyyy,mm,dd)")
CrystalReport1.SelectionFormula = Qry
CrystalReport1.RetrieveDataFiles
CrystalReport1.WindowState = crptMaximized
CrystalReport1.Action = 1
End Sub
Saturday, March 06, 2010
Subscribe to:
Post Comments (Atom)
1 comment:
thx alot buat info nya tp & " " _
buat apa ya? kenapa harus dipisah dengan ""
Post a Comment