Show column sum function?

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
d.smith
Posts: 7
Joined: 2013-10-13 16:33

Show column sum function?

Post by d.smith » 2013-10-13 16:42

Hi,
Before I ask a question I would like to say thanks to Ahmad for a great product. I used to use Appgini many years ago and wrote a small testimonial to acknowledge my support for the program and am now back and have purchased the new version to begin using it once again..

My question is related to the Show Column Sum function. I have noticed in the Simple Invoicing sample this function is used to create sums providing the totals for certain fields? I don't however understand how to use it to do this? I have used F1 to read the help on the function but still am lost as what to do to make use of it? I have several fields I would like to add together to provide a total value but am stuck.

Any help would be most appreciated.

Thanks in advance.
Dave.

User avatar
a.gneady
Site Admin
Posts: 1354
Joined: 2012-09-27 14:46
Contact:

Re: Show column sum function?

Post by a.gneady » 2013-10-14 00:54

Thanks for your feedback.

The sum function provided by AppGini can show the sum of a single field across multiple records but can't currently be used to calculate the sum of multiple fields ... to apply it, select a numeric field in AppGini and check the option labeled "Show column sum" ... that's all you need to do to use it.
:idea: AppGini plugins to add more power to your apps:

AhmedBR
AppGini Super Hero
AppGini Super Hero
Posts: 327
Joined: 2013-09-19 10:23

Re: Show column sum function?

Post by AhmedBR » 2013-10-14 01:33

The sum is a very good function and I am using it a LOT, but found one problem:
If the fields are lookups the sum would add the IDs instead of the real values!
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

User avatar
a.gneady
Site Admin
Posts: 1354
Joined: 2012-09-27 14:46
Contact:

Re: Show column sum function?

Post by a.gneady » 2013-10-14 23:37

I have this bug on my to-do list for fixing in a future release (not the next one unfortunately)
:idea: AppGini plugins to add more power to your apps:

d.smith
Posts: 7
Joined: 2013-10-13 16:33

Re: Show column sum function?

Post by d.smith » 2013-10-15 20:58

a.gneady wrote:The sum function provided by AppGini can show the sum of a single field across multiple records but can't currently be used to calculate the sum of multiple fields ... to apply it, select a numeric field in AppGini and check the option labeled "Show column sum" ... that's all you need to do to use it.
Thank you for that explanation.

johnboy
Posts: 3
Joined: 2014-06-07 06:31

Re: Show column sum function?

Post by johnboy » 2014-07-13 09:20

AhmedBR wrote:The sum is a very good function and I am using it a LOT, but found one problem:
If the fields are lookups the sum would add the IDs instead of the real values!
Hi,

Any update on fixing this bug?


Thanks


John

User avatar
a.gneady
Site Admin
Posts: 1354
Joined: 2012-09-27 14:46
Contact:

Re: Show column sum function?

Post by a.gneady » 2014-07-15 01:00

Not yet unfortunately ... but here is a starting point if you want to fix it manually for now: In the generated "tablename_view.php" file (where tablename is the name of the concerned table), find the line starting with

Code: Select all

$sumQuery=
and edit the query in there to sum the parent field rather than the lookup field.
:idea: AppGini plugins to add more power to your apps:

Post Reply