Report with multiple/range of parameter field

tweetyksc

Registered User.
Local time
Today, 19:26
Joined
Aug 23, 2001
Messages
87
Hi all,
Simple thing, but I haven't done it before.

I've got some reports that the user can run for multiple criteria. One of the parameter/criteria fields is dept. They can leave blank for all or choose the dept. Works fine.

What I'm now back to doing is designing a mass email of one of these reports to the customer's employees. This means that the report will be run, filtered by the "dept" parameter, and sent to employees.

I'm going to set this up in a table, with the employee's email address as a field and the dept as a field. Since some employees may have not one, but multiple depts. or a range of depts - what is the proper way to list this in the table?
i.e. if a user needs depts 505 and 600 ---"505, 600"?
i.e. if a user needs a range of 100 - 150 ---"100-150"?

The company says they will maintain a list of who gets what, so I want to be able to let them know how it should be indicated so they can send it to me correctly without a lot of tweaking when updated. I'll check it of course :)
 
Pat Hartman said:
If an employee may belong to more than one department (unusual but not unheard of), create a relation table to implement the many-to-many relationship between employee and department. If an employee belongs to only one department, there will be only one row in the relation table for the employee. If he belongs to many departments, there will be many rows in the relation table for the employee.
As for selection criteria, use a multi-select list box to choose multiple departments. Search here for ways to build criteria from a multi-select list box.

Thanks pat for your response.
The thing is - the criteria won't be selected from a list box.

This will eventually be set up so that the user clicks a button and the report is filtered for the individual's departments (yes, some have several) and the email is automatically generated and emailed with the report to the employee.
I'm trying to figure out how I should set the data up in the table to filter the report automatically from the table data.
Since this data may change, and the customer is going to update the information when it changes, I don't think it should be coded into the module but run from a table.

There are 180 users and 200 depts; this is something that I need to figure out how to automate. Right now, the user CAN run this by selecting the dept and choosing the email option and manually emailing.

I can play around with (and found some starting points here) about how to generate the emails from a table, but don't know the best way to set up the table to filter the report.
 

Users who are viewing this thread

Back
Top Bottom