How to indicate the number of Sales Order invoice in the report

Hi all,

I have a question where i already created a new report to show the number of sales order invoices and the amount,

but the issues is that i able to total up the amount quantity of each Sales Order invoice but only i cannot able to do it how to

indicate the number of Sales Order invoice .

For example

Sales Order Quantity

SO-xx-xxxxx 20

SO-yy-yyyy 15

2 35

I was able to do the total for quantity but for sales order , i cannot able to do it…

Any way help me and advise how to do it…


You can take a counter variable and increase it by Sales header

Like how mohana?

More percise bit…i bit confusing now…



What are the dataitems you have used in report?

Where are you getting the sales order no’s?


2.sales id

you can use a variable(int) as a counter for every sales id from the sales table. Then use another variable (real) to sum(quantity).

hi althesia,

which mean is it we need to do coding to make the total number of sales order will be show on the footer

please help me …i really stuck at here actually, regarding total quantity i already got the total quantity but total number of sales order

invoices i didn’t got actually.



try this code on the jobs…i thought this is the easy way to understand it. You can remove the condition if you don’t need it.

SalesTable _salesTable;
SalesLine _salesLine;
Int a,TotalQty;
a = 0;
while select _salesTable where _salesTable.DocumentStatus == DocumentStatus::Invoice &&
_salesTable.CurrencyCode == “EUR” &&
_salesTable.CustGroup == “90”
select sum(SalesQty) from _salesLine
where _salesLine.SalesId == _salesTable.SalesId;
TotalQty = _salesLine.SalesQty;


info(strfmt(’%1 - %2’,a,TotalQty));

Hi althesia

so this coding for total quantity or total number of sales order

but only we can do is coding only…not not the properties itself

and thanks be patient on me…



if want to know the total number of sales order (with or without condition) you should use coding or query sql.

properties itself can’t handle it. just try the code and you will see the total number of sales order. You also can move the info statement to see the differences.

and if you already found your answer please mark this conversation to answered, so it’s not appear as unanswered anymore.

Is this Regarding NAV or AX?

Hi mohana

It is regarding AX

Hi althesia

This code actually need to add in which field,

is it in sales order total, total quantity or overall report it self…

Can you move it to AX forum…you posted in NAV.