Crystal Report Problem w/ VB & SQL 
Author Message
 Crystal Report Problem w/ VB & SQL

I am trying to pass Crystal the following sql statement;

Select customer.name, sum(invoice.amount) as total
from customer, invoice

To setup a field in Crystal Reports, you have to point to the database
and field name (i.e. Customer.name).  In the above SQL statement the
'Total' field is created at run time.  I've tried formulas and tried
invoice.Total to fool crystal reports.  In either case they fail.
Any suggestions???

Has anyone run into this problem???.  If so...how did you get around
this problem...????

Bill Zeiher.

PS I am using vb 6.0 and crystal 7.0



Mon, 24 Sep 2001 03:00:00 GMT  
 Crystal Report Problem w/ VB & SQL
Try

Select customer.name, 'Total' = sum(invoice.amount)
from customer, invoice



Mon, 24 Sep 2001 03:00:00 GMT  
 Crystal Report Problem w/ VB & SQL
Is that your exact SQL statement? If so why aren't you joining the customer
and the invoice tables together (Where customer.key = Invoice.key)

Hope I was some help.


Quote:

> I am trying to pass Crystal the following sql statement;

> Select customer.name, sum(invoice.amount) as total
> from customer, invoice

> To setup a field in crystal reports, you have to point to the database
> and field name (i.e. Customer.name).  In the above SQL statement the
> 'Total' field is created at run time.  I've tried formulas and tried
> invoice.Total to fool crystal reports.  In either case they fail.
> Any suggestions???

> Has anyone run into this problem???.  If so...how did you get around
> this problem...????

> Bill Zeiher.

> PS I am using vb 6.0 and crystal 7.0



Tue, 25 Sep 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. SQL Server & Crystal Reports problem

2. Good Reporting Tool for VB to SQL (Currently Use Crystal) or Crystal w/SQL Help Appreciated

3. VB, Crystal Reports & Oracle Problem

4. Runtime Problems with VB, Crystal Reports & Oracle

5. Crystal report & VB problem

6. Crystal Reports 7 && VB 5.0

7. Q: Pass a SQL query from VB to crystal report sub-report

8. crystal report & sql

9. Crystal Reports & SQL

10. Crystal Reports & Sql Query's

11. Crystal Reports & SQL

12. Crystal Report & Sql Server 7

 

 
Powered by phpBB® Forum Software