Sales Invoice Amount Month Wise
divyesh10
Member Posts: 71
I am trying to create a report from sales header to display the total amount month wise
I have taken sales header table and i have to show currency wise amount
and tried to group on currency code in layout but not getting how to group monthwise.
the report is being printed for the starting month and all amount are printed in the Report.
I have taken sales header table and i have to show currency wise amount
and tried to group on currency code in layout but not getting how to group monthwise.
the report is being printed for the starting month and all amount are printed in the Report.
0
Comments
-
If it's RTC report what about adding a field to the dataset with year and month (something like FORMAT("Posting Date",0,'<Year4><Month,2>') ) and using it to group records?* Daniele Rebussi * | * Rebu NAV Diary *0
-
thank you very much sir for your time and advice
i got the report
this is the code for the same.
I have defined start date end date as filter in report page
OnPreReport()
IF((sdate = 0D) AND (edate = 0D)) THEN
ERROR(Text000);
OnPostReport()
Sales Header - OnPreDataItem()
SETFILTER("Document Date",'%1..%2',sdate,edate);
CurrReport.CREATETOTALS("Amount to Customer");
SrNo :=0;
Start:= DATE2DMY(sdate,2);
Sales Header - OnAfterGetRecord()
USDTotal:=0;
EuroTotal:=0;
Month:=0;
Year:=0;
Month:= DATE2DMY("Document Date",2);
MonthName :=FORMAT("Document Date",0,'<Month Text>');
Year:= DATE2DMY("Document Date",3);
IF Month <> AfterMonth THEN
SrNo := SrNo+1;
IF "Currency Code" <> '' THEN BEGIN
IF "Currency Code" = 'USD' THEN BEGIN
CALCFIELDS("Amount to Customer");
USDTotal := "Amount to Customer";
END;
IF "Currency Code" ='EURO'THEN BEGIN
CALCFIELDS("Amount to Customer");
EuroTotal := "Amount to Customer";
END;
END;
AfterMonth:= DATE2DMY("Document Date",2);
did grouping on month in report of rtc
and will get the result0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
