Hi,
I have a grid with a total record and a column with percent values that are calculate from two columns in the same grid. The question is: How can I totalize this column in the total record of the grid?
Hi,
I have a grid with a total record and a column with percent values that are calculate from two columns in the same grid. The question is: How can I totalize this column in the total record of the grid?
Re: Calculate a Percent value in a total grid record
Off the top of my head…
If these are fields you created, even though calculated, are they not visible in the totals section to allow you to create a total as you would a regular field?
If not then you could keep a running total using the onRecord event?
Regards,
Scott.
Re: Calculate a Percent value in a total grid record
Thanks for reply Scott.
The fields can be showed in total secction, but i need show a field in total section that is result of the division between two total column. let me show with the next image:
How you can see, the total in the D column must be the C column divide by A column.
Regards,
Jose Casta?o
Re: Calculate a Percent value in a total grid record
They really need to add onSummary and onTotal events… for now
-Create a total for column D, just like for A,B,C
-Override the value using: {sum_your_field_name} = C/A in the onGroupByAll event.
‘sum_’ is the required prefix to override the displayed total.
ie: field_name = {my_field} so, that would be {sum_my_field}
Regards,
Scott.
Re: Calculate a Percent value in a total grid record
I have done your indications, but the result is the sum of the column and not the division. Any idea that what can be?
Regards,
Jos?
Re: Calculate a Percent value in a total grid record
Does not matter… the sum_ is just a placeholder… you are proving the math to the placeholder.
override:
{sum_your_field_name} = {field_c} / {field_a}
Regards,
Scott.