Get KoolPHP UI with 30% OFF!

Round in Grandtotal (SUM)

Carlos Eduardo
Why does a SUM rounding occur that does not happen in the Average?
I wish there were no rounding.
Posted Jan 20, 2017 Kool
Carlos Eduardo
Someone ?
Posted Jan 20, 2017 Kool
Peter
Could you please set
$field = new PivotAverageField ("field_name");
$field->DecimalNumber = 0;
Posted Jan 23, 2017 Kool
Carlos Eduardo
I want see decimals ...
I believe that is so :
$field = new PivotAverageField ("field_name");
$field->DecimalNumber = 2;
Right ?
Posted Jan 23, 2017 Kool
Carlos Eduardo
Are there someway to format with my regional settings ?
Tks so much
Posted Jan 23, 2017 Kool
Peter
Use you the FormatString property:
$field->FormatString = "EUR {n}"; //For example
Posted Jan 23, 2017 Kool
Carlos Eduardo
But what about exchanging commas for points and vice versa?
Posted Jan 23, 2017 Kool
Peter
$field->DecimalPoint = ".";
$field->ThousandSeperate = ",";

You may try this codegen http://codegen.koolphp.net/pivot_table/
Posted Jan 23, 2017 Kool
Carlos Eduardo
Tks so much !
Posted Jan 23, 2017 Kool
Carlos Eduardo
But it is not all right ...
when we close a level of grid the grand total and open the level again ... the aggregation that is a average type so ... change to sum aggregation type...
Before

After
Posted Jan 27, 2017 Kool
Carlos Eduardo
The metric show with description Average Grand Total and in font is
$field = new PivotAverageField("PRECO_CUSTO");
$field->DecimalNumber = 2;
$field->Text = "Preço de Custo - Medio";
$field->FormatString = "R$ {n}"; //For example
$field->DecimalPoint = ",";
$field->ThousandSeperate = ".";
$field->AllowReorder = false;
$pivot->AddDataField($field);
And the calculations show a SUM Value not an Average Value.
Posted Jan 27, 2017 Kool
Peter
We will check on this issue and come back to you as soon as possible.
Posted Jan 27, 2017 Kool
Carlos Eduardo
When will I have the answer? Because I need to finish my project.
Posted Jan 30, 2017 Kool
Carlos Eduardo
Hi, how are you ?
Good Day for you.
I´m Waiting for the FIX.
Tks so much.
Posted Feb 7, 2017 Kool
David
Hi Carlos,
We have sent an updated version to you via ticket support. Please try it and let us know it's good for you. Thanks!
Posted Feb 8, 2017 Kool -
Carlos Eduardo
The solution is not totally ok yet.
There is a problem in Grand Total of Average ...
See attached pictures.
I have not even tested MAX and MIN ... are you OK with these groupings?


Posted Feb 8, 2017 , edited Feb 8, 2017 Kool
David
Hi Carlos,
Is there something wrong with the grand totals of average? Please remember they are not an average of individual Canal or Hierarquia, etc but the average of individual rows in the database.
Those grand totals are computed using sql query and AVG operator. You could run a direct sql query in your database interface to check those values. Please let us know the result. Thanks!
Posted Feb 9, 2017 , edited Feb 9, 2017 Kool
Carlos Eduardo
You are right ! Tks !
Posted Feb 11, 2017 Kool