General information
Category:
Third party products
Title:
Not getting records.
Hi,
Anybody can help me!!
I have a report that display the record that i manipulate in MS-SQL2000 but it doesnt display on my crystal report and when i used the nextrecordset of VB it like hang....
cmd.CommandTimeout = 5
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "SP_SalLedAuditTrail"
Set prmFrom = cmd.CreateParameter("dFrom", adDate, adParamInput)
prmFrom.Value = Format(DTPicker1.Value, "mm/dd/yyyy")
cmd.Parameters.Append prmFrom
Set prmTo = cmd.CreateParameter("dTo", adDate, adParamInput)
prmTo.Value = Format(DTPicker2.Value, "mm/dd/yyyy")
cmd.Parameters.Append prmTo
Set RS = cmd.Execute
If Not RS.EOF Then
Dim rptApp As CRAXDRT.Application
Dim rptReport As CRAXDRT.Report
Set rptApp = New CRAXDRT.Application
Set rptReport = rptApp.OpenReport("c:\source\rpt\SOSSalLedAudTrail.rpt")
rptReport.Database.SetDataSource RS, 3, 1
frmRpt.CRViewer1.ReportSource = rptReport
frmRpt.CRViewer1.ViewReport
frmRpt.Show vbModal
Else
MsgBox "No record to be printed....", vbInformation + vbOKOnly, "Empty Record"
End If
NOTE:
When i execute in Query Analyser they have records...
You attention is most appriciated......
TIA
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only