September 10, 200322 yr Okay, here's one for you wizards: We have a time-register database that are used by 15 or so people. In one record, they choose their name and type in how many hours they've worked on a project/customer. What I want is statistics for how many hours, how much money all these employees have earned. I'm thinking something like this: Do a find on person Joe Blow to list all the money only this person has generated. Copy summary-field to other field for storage. Repeat for all employees. How can I do this without having to do 15 Set Field ["Employee", "Joe Blow"] ? Do I use a repeating field for storing the individual totals? Use loop and lookup the employees' name from another database? Any help and pointers will be greatly appreciated... Thanks! Willy
September 10, 200322 yr What do you want to produce? Do you want a report by Employee? Do you want a spreadsheet with each employee in a column? I can think of more than a dozen ways to accomplish what you are talking about, but more specifics are needed to really get to what will solve your problem.
September 11, 200322 yr Author Sorry about that, have to be more specific. I want all the employees with their totals to be displayed on one page. What I've done now seems to work alright, I do the search and put the resulting totals in an Employees Database for storage. Not that it's a real problem, just a curiosity: Why won't this work: Set Field ["People_total::Total_amount", "0"] It doesn't put the zero in the field, just leaves it blank... Thanks! Willy
September 11, 200322 yr What are the match fields in your People_total relationship? Could you possibly be setting the field from a record for which the relationship isn't valid?
September 11, 200322 yr Just so we are talking about the same thing. What I think that you are starting with is a report that looks something like: Header SubSummary by SalesPerson Body SubSummary by SalesPerson Trailing Grand Summary Joe Jackson - 44 Hours Job 1 - 23 Hours Job 2 - 12 Hours Job 15 - 9 Hours Bill Smith - 46 Hours Job 2 - 14 Hours Job 4 - 26 Hours Job 7 - 6 Hours Grand Total: 90 Hours Now you may have more fields or a different format, but really you just wanna display: Joe Jackson - 44 Hours Bill Smith - 46 Hours Grand Total: 90 Hours What you can do is to format your report as in the first example, so that you know that you have the right information and that the math is adding up properly. Then change the "Body" part to a SubSummary by RecordID and Sort the report by SalesPersonID. The details of the body will then disapear from the report and you will be left with the above example. If you ever wanna show the details, you just need to sort by SalesPersonID / RecordID and the detail sub-summary will show. A "Body" part is not necessary in reports, I do this trick all the time.
Create an account or sign in to comment