gaby78 Posted October 19, 2007 Posted October 19, 2007 I have been struggling with subtotals for weeks with no results. Could someone please take a look at the attached file and let me know if this is feasible in FM without using additional TOs and relationships? Very much appreciated. Subtotals.pdf
comment Posted October 19, 2007 Posted October 19, 2007 Each item needs to have a MainCategory field (either sale or expense) and a SubCategory field (type of sale/expense). You also need two corresponding sub-summary parts. Once you have that, a single summary field (Total of Amount) will provide all the sums you need - except the Net. An easy way to handle the net is to make all expenses negative. Then the same summary field, when placed in a Grand Summary part, will return the net value.
gaby78 Posted October 19, 2007 Author Posted October 19, 2007 Thanks Comment, it worked perfectly. Much appreciated. Just out of curiosity is there a way to grab the individual subtotals that appear in summary parts and temporarily store them in global fields or in variables. For example variable $Exp1 would store Tot exp1, $Exp2 would store Tot exp2 and so on. I tried using Getsummary( ) but got nowhere, or probably using a script to grab each subtotal and store it in global fields, or is there a custom function that does that? Thanks again
comment Posted October 20, 2007 Posted October 20, 2007 is there a way to grab the individual subtotals that appear in summary parts Yes, GetSummary() does that. GetSummary ( sTotalAmount ; SubCategory ) will return the total amount in the SubCategory of the CURRENT record - provided the records are sorted by SubCategory.
Recommended Posts
This topic is 6305 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