!Help Crystal Reports 
Author Message
 !Help Crystal Reports

I am using the CR Control of CR7 to report on a SQL Server Database but the
report it Generates is without
Data - Just field labels.

Here is my Code

Help!

Private Sub PrintReports()
Dim db As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim sSql As String
On Error GoTo dbErrors

  sSql = "Select Customer.*, Carrier.*, Rates.* " _
  & "From Customer,Carrier,Rates " _
  & "Where Customer.CustomerID = " & intCustomerID & " " _
  & "And Carrier.CarrierID = " & CarrierID & " " _
  & "And Rates.CustomerID = " & intRateID & " " _
  & "And Rates.CarrierID = Carrier.CarrierID " _
  & "Order by Sector"

  db.Open dbConnString

  rs.Open sSql, db, adOpenStatic, adLockOptimistic

  crpt.Connect = "Driver=SQL Server;Server=" & dbPath &
";Database=Network_Express"
  crpt.ReportFileName = App.Path & "\Rate.rpt"
  crpt.WindowState = crptMaximized
  crpt.PrinterSelect
  crpt.SetTablePrivateData 0, 3, rs
  crpt.PrintReport

  rs.Close
  db.Close
  Set rs = Nothing
  Set db = Nothing

  Exit Sub
dbErrors:
  MsgBox Err.Number & Err.Description, vbCritical, "Error Printing Report"

End Sub



Sat, 31 Jan 2004 13:40:43 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Please Help...Crystal Reports..Please Help

2. Help: Crystal Reports and programmatic DataSet

3. Help: Crystal Reports programming...

4. Help: Crystal Report from programatic DataSet

5. Help: Crystal Report from programatic DataSet

6. Help Crystal Report

7. HELP CRYSTAL REPORTS

8. Ref Help Crystal Reports

9. Help - Crystal Reports will not refresh

10. Help: Crystal Reports section subtotal problem...

11. Help : Crystal Report syntax

12. Help: Crystal Report 6.0 OLE / DAO problem

 

 
Powered by phpBB® Forum Software