Newbies drogers Posted June 23, 2004 Newbies Posted June 23, 2004 Hi I have a database with patient information. i want to make a report that sorts the patients into each of about 10 financial classes. I want it to then sort the totals for these financial classes by age categories. I was wondering if there was a way to do this without manually calculating the totals for each age category
ctz243 Posted June 23, 2004 Posted June 23, 2004 look at the sample I sent in a recent post I made about subsummaries. The file is called 111591-SubSummary.zip. It illustrates a problem with counting the classes if they are in a different relationship, but does provide totals for categories and shows how it can be done with related records too. At least you could play around with it. Basically the subsummary function is what you need. If it's in a flat file, make subsummary categories for each break, ie one for financial class, and another by age, either above or below the body part containg put the individual records. Sort the file by category first then by age, and view in preview. Use status fields to count fields, put them anywhere and the totals will be right. Subsummary parts can go above or below the body (leading or trailing subsummaries). There are bugs in FM7 in terms of putting parts on reports, sometimes it's easier to add them from the menu rather than dragging them from the status bar. The body part is (I think) optional, leaving only the counts / totals. Not totally intuitive but can be got right without any scripting Don't forget: sorts must match subsummaries, and be in the same order, and you must look in preview mode. Note also that summary counts/totals only work for the 'base' (child) table, not 'parent' type related tables. Hence my other post. I now think that doing counts for fields in 'parent' tables require a script loop - it basically won't work without some fiddling. Hope this helps - chris.
Newbies drogers Posted June 24, 2004 Author Newbies Posted June 24, 2004 Thanks for the help i was actually able to figure it out. All i had to do was add a leading subsummary part before the original one. Thanks again
Recommended Posts
This topic is 7718 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