Hello group,
Imagine the following two tables:
accounts:
account# Name CreateDate Salesrep
=====================================================
0101 ABC 01-02-05 CARLOS
0102 ACB 02-02-05 JOHN
0104 CBA 01-12-04 BEN
orders:
account# doc_date
=====================
0101 02-02-05
0104 01-04-05
0101 05-02-05
Ok - I want to create a report, that lists new accounts from a given period. In addition, I'd also like to show when the newly created client was first invoiced (from the "orders" table).
When I create my report, I can easily display the accounts, but when I add the orderdate - it will list the same account for each order in the "orders" table.
fx. with the above stated data, it will list the account '0101' twice. When in fact, I only want to show the first order date.
I can do it in pure SQL, but I do not know how to do it in Crystal. In SQL I would use the min() aggregate function on the doc_date field.
Any help would be much appreciated.
/mich
Imagine the following two tables:
accounts:
account# Name CreateDate Salesrep
=====================================================
0101 ABC 01-02-05 CARLOS
0102 ACB 02-02-05 JOHN
0104 CBA 01-12-04 BEN
orders:
account# doc_date
=====================
0101 02-02-05
0104 01-04-05
0101 05-02-05
Ok - I want to create a report, that lists new accounts from a given period. In addition, I'd also like to show when the newly created client was first invoiced (from the "orders" table).
When I create my report, I can easily display the accounts, but when I add the orderdate - it will list the same account for each order in the "orders" table.
fx. with the above stated data, it will list the account '0101' twice. When in fact, I only want to show the first order date.
I can do it in pure SQL, but I do not know how to do it in Crystal. In SQL I would use the min() aggregate function on the doc_date field.
Any help would be much appreciated.
/mich