|
-
Aug 14th, 2003, 09:54 PM
#1
Thread Starter
Fanatic Member
DiscardSavedData method not working!
VB Code:
Dim cReport As CRAXDRT.report
Dim cApp As New CRAXDRT.Application
Dim rst As New ADODB.Recordset
Set cReport = cApp.OpenReport(App.path & "\rptInvoicingReport.rpt")
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
cReport.DiscardSavedData
cReport.Database.SetDataSource rst
CRV.ReportSource = cReport
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
-
Aug 20th, 2003, 06:29 PM
#2
Thread Starter
Fanatic Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|