Totaling

hi good afternoon…

we are specifying the fields in the totalfields property in report data item.

is those fields must be a sum-index fields in the table …

can you give the difference between the sumindex field and the fields declaring in TotalFields property…

Hi,

I believe the answer is NO.

As you may know SumIndexField is a decimal field that you attach to a key and are maintained when the database record is updated.

The difference is that, basically you need to call CALCSUMS function in your report to calculate SIFT. Below is how you can work with a SIFT field (Amount) attached to a combined KEY (AccountNo,PostingDate) as an example:

GLEntry.SETCURRENTKEY(“G/L Account No.”,“Posting Date”);
GLEntry.SETRANGE(GLEntry.“G/L Account No.”,‘1110’);
GLEntry.SETRANGE(GLEntry.“Posting Date”,DMY2DATE(1,1,2007),DMY2DATE(15,12,2007));
GLEntry.CALCSUMS(Amount);

Regarding the TotalFields and GroupTotalFields Property, which are used for grouping within a report, you may read refer to: http://msdn.microsoft.com/en-us/library/dd338976.aspx

Hi Mahesh,

The fields in the TotalFields property are normal fields where you want to a total printed on the report.

SumIndex fields or FlowFields as they are called in NAV, are fields where the field in it self is a calculated total of another field. Like “Balance” on the Customer is the complete sum of all debits and credits made in the Customer Ledger Entry for the specific customer. A flowfield requires that an index key exists in the sum index table (in this example the Customer Ledger Entry table) for the filter combination used by the flowfield.

In TotalFields property you can specify both “normal” fields, but also FlowFields.