Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB with Crystal Report

Status
Not open for further replies.

12091971

IS-IT--Management
Nov 29, 2000
1
ID
Iwant to to connect between Vb with Crystal Report in my project, which I want to create report according to company omset from "startdate" to "EndDate" and the date has "field date" but the report errors.

Here I Write the script of the error below :

Private Sub CmdPrint_Click()
CrRpt.WindowTitle = "Report Barang"



CrRpt.SelectionFormula = "{T_ExpPeriode.Tgl_Tran} in " & TxtStartDate.Text & " to " & TxtEndDate


CrRpt.ReportFileName = "C:\EximData\Report\RptOmset.Rpt"
CrRpt.WindowState = crptMaximized
CrRpt.Destination = crptToWindow
CrRpt.Action = 1

End Sub

 
What is the error?
I am going to guess that the formula being passed to Crystal does not meet syntax rules, probably the date format used.

Literal Dates in a Crystal formula should be in the format:

Date (yyyy,mm,dd)

Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top