- Click on ColumnA and open its properties (Alt+enter)
- Modify the SumAll to YES
- Create a new field (named ColumnASum) typed Sum
- In its properties, modify the dataFieldName to ColumnA
Remark : naturally the ColumnASum must be created outside and after the Body containing the ColumnA
For example, you put the ColumnA in the body of a section group in a generated design and the sum of this column in the footer of the section group.
II. You can also calculate the sum of a column following another method :
In the classdeclaration, declare a variable : sumnet
In the executeSection method of the body you calculate the sum of your column :
public void executeSection()
{
sumnet=sumnet+tmpPayrolljournaldata_1.PayrollPaytypeAmount4;
{
sumnet=sumnet+tmpPayrolljournaldata_1.PayrollPaytypeAmount4;
super();
}
}
Then, in the method of your report create a method that displays this variable :
Display Amount _SumNet()
{
return SumNet;
}
{
return SumNet;
}
In the Grand Total section : Footer of the generated design for example:
create a field and set its DataMethod to _SumNet .
this field calculates the sum of your column.
Resources
https://community.dynamics.com/product/ax/f/33/p/31623/54232.aspx
http://axassociate.blogspot.com/search/label/Report?max-results=3
Happy Daxing!
Aucun commentaire:
Enregistrer un commentaire