Ording and filtering Report by Variable
kolaboy
Member Posts: 446
Hi,
I have develop a report that is counting payments by looking at document Payment and subtract it from the months queried using start period and end period to get the months owed. The months owed is a global variable of type decimal. I want my report to be able to filter by months owed. say filter by all customers who owed 2months- 3months or 4months and so on.
How can i do this? Can someone help me please.
Thanks
I have develop a report that is counting payments by looking at document Payment and subtract it from the months queried using start period and end period to get the months owed. The months owed is a global variable of type decimal. I want my report to be able to filter by months owed. say filter by all customers who owed 2months- 3months or 4months and so on.
How can i do this? Can someone help me please.
Thanks
0
Comments
-
Use temp table for that. Fill it with the data, filter it, loop it, do what you want.0
-
variable
monthsfilter text 250;
auxmonths record integer;
OnAfterGetRecord
monthsOwned := CalculateTheMonthsOwnedFunction("Customer");
IF (monthsfilter <> '') THEN
BEGIN
AuxMonths.SETFILTER(Number,MonthsFilter);
AuxMonths.Number = ROUND(monthsOwned,'>',1);
IF (NOT AuxMonths.FIND) THEN
CurrReport.SKIP;
END;0 -
Where should the above code be place. In the temp table or in the cust.ledger Entry table where i am doing the calculation.variable
monthsfilter text 250;
auxmonths record integer;
OnAfterGetRecord
monthsOwned := CalculateTheMonthsOwnedFunction("Customer");
IF (monthsfilter <> '') THEN
BEGIN
AuxMonths.SETFILTER(Number,MonthsFilter);
AuxMonths.Number = ROUND(monthsOwned,'>',1);
IF (NOT AuxMonths.FIND) THEN
CurrReport.SKIP;
END;
Kine, Can you please explain to me in steps form like apertierra does how to use the temp table.
Thanks0 -
You don't need any temporary table, since you are not sorting, if you were needing to sort, check the "top customers list" report or the "top items list" report to see how to do so.
If you really need to ask where the code I put needs to go, you migth better ask your NSC to create the report for you.0 -
I would also like to sort by months owed.
Thanks0
Categories
- All Categories
- 73 General
- 73 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 327 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
