Changing SQL statement in Report Designer Component 
Author Message
 Changing SQL statement in Report Designer Component

I use the Crystal Reports designer component with VB5 & 6, and I've been
trying to get the setDataSource to work with DAO recordsets.

Each report I use contains multiple tables from the same database (an Access
file local to the machine running my app)

Do I have to set the source for each of these tables?

When I do, why doesn't the report show the data from this new source?

Having given up on this, I tried making a report based on an SQL statement,
rather than a fixed table.  It defaults to the name 'dao', which I don't
seem to be able to change.  It works fine, but I can't see how to change the
SQL statement that the 'dao' table is based on.

Why?  I have 7000 records in a database.  Each record has a boolean which
indicates whether it has been printed or not.  When new records are added,
they are marked as Unprinted.  My report needs to print either all records,
or the unprinted ones.  Using recordselection & groupselection is taking
around 60 - 120 seconds to get the first page out, whereas using an SQL
statement to select the records, then printing the report is done in under 5
seconds.

However, I need 2 different SQL statements, and that's where i'm stuck.
(i.e. Select * from invoices where printed = false
            OR                     Select * from invoices)

Cheers,

Simon Haynes



Wed, 02 May 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Report Designer Component - Changing Data Source At Run-Time

2. Changing a formula @ Run Time - Report Designer Component

3. Changing Groups Using Report Designer Component

4. Crystal Reports 6 Report Designer Component

5. Crystal Reports Report Designer Component

6. Crystal Report Designer Component (Previewing a report.)

7. Crystal Reports "Report Designer Component"

8. Crystal Report Designer Component (Previewing a report.)

9. changing ADO command′s SQL statement before showing a report

10. Report Designer Component for Visual Basic 5.0

11. crystal Report designer component question?

12. Where to get Report Designer Component 7?

 

 
Powered by phpBB® Forum Software