We are a group of users of Blackbaud products and are not affiliated with Blackbaud. We'd love to have you join our community to help and be helped in getting the most from your Blackbaud software.
Register now to join us to get independant advice on your system, connect with 3rd party consultants to help you maximize your database and have a real alternative to the official Blackbaud website.
I am writing a report in Crystal that will show the last three actions and the next three actions. I imported all dates from RE. I was changing the dates in RE Export but if other staff run the report they do not know how to do that. So I would like to have Crystal do it automaticly, but I don't know how to write a formula that says. Take todays date and show me the last three actions or next three actions. I do have a subreport for past and one for future.
It is possible to do this, but not particularly easy. It's easier if you separate last actions and future actions into different sub-reports, but not necessary. Here's what you would need with everything in the main report or in the same sub-report.
A group on the constituent
A boolean formula to separate past and future actions
A group on this boolean formula
Sort on the action date. (Either ascending or descending will work.)
A running total that increments the COUNT on change of action and resets on change of the boolean group.
You'll need to go into the section properties and select the formula for suppression. Your formula will depend on whether you're sorting your actions in ascending or descending order and whether it is a past or future action.
The following formula uses the running total to show the first three actions in the group.
Code:
{#Running Total} > 3
The following formula uses the running total and a total count of actions in the group to show the last three actions in the group.
If you are including multiple action notes or something else that causes the actions to "duplicate" you will need to use a distinct count in your suppression formula.
Drew
__________________ J. Drew Allen
Children's Hospital of Philadelphia
Crystal Reports and SQL Server Consultant
It is better to live your destiny imperfectly than to live an imitation of somebody else's life with perfection.