VB Code:
  1. Dim cReport As CRAXDRT.report
  2.     Dim cApp As New CRAXDRT.Application
  3.     Dim rst As New ADODB.Recordset
  4.    
  5.     Set cReport = cApp.OpenReport(App.path & "\rptInvoicingReport.rpt")
  6.    
  7.     rst.Open "SELECT a.accountid, a.AccountName, pd.AmountDue, pd.InvoiceRequested, pd.GSTapplies FROM ( ( Package p INNER  JOIN PackageType pt ON p.packagetypeid = pt.packagetypeid ) INNER  JOIN PaymentDue pd ON pd.packageid = p.packageid ) INNER  JOIN Account a ON a.accountid = pd.accountid", db.cnn: WaitForQuery rst
  8.    
  9.     cReport.DiscardSavedData
  10.     cReport.Database.SetDataSource rst
  11.     CRV.ReportSource = cReport
  12.     CRV.ViewReport

I use field definition files (i designed it with real tables, grabbed the sql query, made the ttx file, then used the 'set datasource location' to replace the real tables with the ttx file)

some reports work fine, others dont. argh, the recordset is returning a good 256 records, if i put different fields into the recordset the report complains, so i know its geting the recordset its just not USING it!!

bring on the help!

Cheers