How to calculate Sum of 'Amount' month wise and display it in Report .

i m trying to sum amount month wise and display it like

Month Currency code TurnOver
Jan Usd 12211
Eur 21211
Feb Usd 2121345
Eur 213114
Mar Usd 4541
Eur 11313
Apr Usd 1545
Eur 456
May Usd 54
Total Usd 131145454
Eur 1444645654

Create a group to the Month,Currency code key.

I am new to Nav ,but i tried to create this report using array is this a right way?

Are you using NAV 2009 or 2013?

Sir i am using 2013

Hi Divyesh,

You need to provide more information on report such as

Which dataitems you are using for creating reports

You are using array and somebody will use key to generate the reports .You need to think in different possible ways to make your report performance faster and finally the output matters to end user.

Hi Amol Sir ,

Sir i have prepared Statics report by taking array of dimension 12 and then storing the amount month wise

and currency code wise

SalesInvoiceHeader_gRec.RESET;

IF SalesInvoiceHeader_gRec.FINDFIRST THEN BEGIN

REPEAT

SalesInvoiceHeader_gRec.SETFILTER(“Posting Date”,’%1…%2’,sdate,edate);

Pdate:=DATE2DMY(SalesInvoiceHeader_gRec.“Posting Date”,2);

IF i=Pdate THEN BEGIN

IF SalesInvoiceHeader_gRec.“Currency Code”=‘USD’ THEN BEGIN

SalesInvoiceHeader_gRec.CALCFIELDS(“Amount to Customer”);

SumInvoice[i] := SumInvoice[i]+SalesInvoiceHeader_gRec.“Amount to Customer”;

END;

IF SalesInvoiceHeader_gRec.“Currency Code”=‘EURO’ THEN BEGIN

SalesInvoiceHeader_gRec.CALCFIELDS(“Amount to Customer”);

EuroSum[i] := EuroSum[i]+SalesInvoiceHeader_gRec.“Amount to Customer”;

END;

END;

.this code is only for two Currency code but i want to print all currency code with there amount dynamicaly.

You have hardcoded the currency code for two .

You need to take currency as dataitem in report and do the programming accordingly…

How can i get this report dynamically sir?