Displaying all Months in Report

web
Member Posts: 102
Hi;
I have a report that is looking for payments in a table and then display the dates paid for and their amounts.
Now i want to display all the dates queried, wether paid for or not paid for.
The date that are not paid for will have zero amount. Here is the code:
Any idea please.
Thnaks
I have a report that is looking for payments in a table and then display the dates paid for and their amounts.
Now i want to display all the dates queried, wether paid for or not paid for.
The date that are not paid for will have zero amount. Here is the code:
// Initialize variables FromDate :=010107D; ToDate :=TODAY; Amount := 0; TotalAmount := 0; CurrAccTotal := 0; ContMonth := ''; MonthContAmount := 0; // Variable initialization ends above. // Code to Get Previous Contributionsributions ContributionsOld.SETRANGE("Employee No.",Empid); ContributionsOld.SETRANGE("From Date",FromDate,ToDate); ContributionsOld.SETFILTER("From Date",'<%1',FromDate); ContributionsOld.SETFILTER("To Date",'<%1',ToDate); // Code Ends Above. IF ContributionsOld.FIND('-') THEN BEGIN OldAmount := ContributionsOld.Quantity; IF ContributionsOld.NEXT <> 0 THEN REPEAT OldAmount := OldAmount + ContributionsOld.Quantity; UNTIL ContributionsOld.NEXT = 0; END; Cont.SETRANGE("Employee No.",Empid); Cont.SETRANGE("From Date",FromDate,ToDate); Cont.SETFILTER("From Date",'>=%1',FromDate); Cont.SETFILTER("To Date",'<=%1',ToDate); IF Cont.FIND('-') THEN BEGIN TotalAmount := Cont.Quantity; ContMonth := FORMAT(Contributions."To Date",0,'<Month Text>, <Year4>'); Months := Cont.COUNT; IF Cont.NEXT <> 0 THEN REPEAT TotalAmount := TotalAmount + Cont.Quantity; UNTIL Cont.NEXT = 0; END; //Formatting Months Below ContMonth := FORMAT(Contributions."To Date",0,'<Month Text>, <Year4>'); MonthContAmount := Contributions.Quantity; EndDate := FORMAT(ToDate,0,'<Day> <Month Text>, <Year4>'); BeginDate := FORMAT(FromDate,0,'<Day> <Month Text>, <Year4>'); // Formatting Ends above line.ContMonth display the months.
Any idea please.
Thnaks
0
Comments
-
I'm guessing you are in a report:
You could do something with the Date table
Date data item with filters for your date range
Values you want to check for that date0 -
an you please suggest a code for me that would work for me. I don't have any idea in using the date dataitem. I am getting the contributions from a table different from the date table. each date should have a corresponding contribution amount
Any idea?
Thanks0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions