Hi, is anyone working with version 8 and using stored procedures? I'm returning a valid recordset from SQL Server, but when I pass this recordset to the report, it doesn't return anything.
Thanks.Code:Dim app As CRAXDRT.Application Dim rpt As CRAXDRT.Report 'Get Data With cmd .ActiveConnection = cnn .CommandType = adCmdStoredProc .CommandText = "S_KM_SalesByCust" .Parameters("@date1") = "11-01-1999" .Parameters("@date2") = "06-19-2000" End With Set rst = cmd.Execute 'Test that Data is Returned -- This Returns Data Do While Not rst.EOF List1.AddItem rst![Project] & " ---- " & rst![Name] rst.MoveNext Loop 'Set Report Object Set app = CreateObject("CrystalRuntime.Application") Set rpt = app.OpenReport("D:\Program Files\KMSystems\Sales By Customer.rpt") 'Pass Data to Crystal With rpt .DiscardSavedData .EnableParameterPrompting = False .Database.SetDataSource rst, 3, 1 End With 'Point Crystal Viewer to Report Object and Open 'No Data Shows in Crystal With CRViewer1 .DisplayBorder = False .ReportSource = rpt .ViewReport End With


Reply With Quote