on 07-30-2009 7:25 PM
we have a report that shows a list of contacts and we have an sub-report that displays (1) one field max(history completed date) so we can see that last time the contact was talked to. The issue is: if we want to have a sort parameter sorts on the max(history completed date) field. How would we do this?
1) pass the field value from the sub-report to the main report?
2) don't created a sub-report, create field value in the main report using sql
Please comment on the approaches above or any other methods that I might not have thought of.
Better yet, here's a sample of what your query should look like.
Insert it into 'Add Command'
select contact_names,
(select max(lasttime) from time.table b where a.contactID=b.contactID)
from table.contacts a
Enjoy,
Zack H.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can't do a sort based on a shared variable from the subreport.
You will need to create a sql statement that brings the max date into your query.
You can use the 'Add Command' feature in Crystal.
I hope this helps,
Regards,
Zack H.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.