Results 1 to 2 of 2

Thread: DiscardSavedData method not working!

  1. #1

    Thread Starter
    Fanatic Member SkiNLaB's Avatar
    Join Date
    Jan 2002
    Location
    Sydney, Australia
    Posts
    747

    DiscardSavedData method not working!

    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

  2. #2

    Thread Starter
    Fanatic Member SkiNLaB's Avatar
    Join Date
    Jan 2002
    Location
    Sydney, Australia
    Posts
    747
    just an update this wasnt working because i used the "set datasource location" thing to change from an access database to the ttx FDF. so i had to basically redo the report drawing from the FDF.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width