Jump to content

Having hard time with subtotals


This topic is 6125 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 6125 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.