how to calculate totals when writing reports

matsekematseke Member Posts: 11
edited 2004-09-21 in Navision Attain
hi there:

I am new to navision and i am trying to get sub totals and grand totals for my report.

for sub totals i have the following fields:
invt, cost , and value1
and i have manage to get the sub totals write by using the following code:
invt:= inventory
cost:= standard cost, etc

but now i get the same for grand total which was suppose to add all the sub totals and give me the total.

So my problem is i dont know whether navision has a build in function which can calculate grand totals or whether i should write a code to do that..
And if so, how do i calculate Grand total? :?

Comments

  • kinekine Member Posts: 12,562
    if you use:
    CurrReport.CREATETOTALS(variable1,variable2,...);
    

    and in OnAfterGetRecord you fill variables with values, it will automaticaly calc totals and grand totals in same way as for fields in TotalFields property on report data item. Totals are then possible to show in groupfooter and footer sections.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.