LVA Posted April 8, 2003 Posted April 8, 2003 I Have a system that registers every person that makes a phone call complaining about a department in the Company . I would like to be able to make a report with the top 10 departments with more complaints. Does someone know how to do this ?
CobaltSky Posted April 8, 2003 Posted April 8, 2003 Hello LVA, You haven't given a lot of information to go on, however I'm assuming that your comapny details are stored in a related file, and that the companyID is stored against every complaint when it is recorded? That being the case, I suggest that you create a relationship from the company file back to your complaints database based on companyID, then create an unstored calculation in the COmpany file with the formula: Count(Complaints::CompanyID) ...where your relationship to the complaints file is called 'Complaints'. Then to get your report of the top ten, set up a script as follows: Sort [restore, no dialog] Go to Record/Request/Page [First] Loop Omit Record Exit Loop If [status(CurrentFoundCount) = 0 or Status(CurrentFoundCount) < (Status(CurrentRecordCount - 9) End Loop Show Omitted Go To Layout ["TopTenBadGuysReport"] Print [No dialog] Show All Records Go To Layout ["Original Layout"] ...where the sort order for the first step is a descending sort on the calc field described previously. When the above is in place, run the script and go chec in your printer out tray... !
Recommended Posts
This topic is 7929 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now