April 8, 200322 yr 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 ?
April 8, 200322 yr 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... !
Create an account or sign in to comment