How to Filter in Report?
p0wertube
Member Posts: 13
Hey Guys,
i'm working on my first report, to provide informations about salescredit-memos for our sales-representatives.
Now I'm trying to add a filter to the report.
Our NAV supplier added an custom option field named "Return Operation" to the table 115 (sc-credit memolines), which
shows if the return is accepted or refused.
So I've added a CAL Global (boolean) and also an option field to the request page. (show only accepted)
Now I have to write some CAL Code so that the report will only print / display all lines (accepted and refused) or just the accepted.
I'm pretty sure that I've have to put it in the OnAfterGetRecord-Trigger, but I have no idea about the syntax.
pls help
i'm working on my first report, to provide informations about salescredit-memos for our sales-representatives.
Now I'm trying to add a filter to the report.
Our NAV supplier added an custom option field named "Return Operation" to the table 115 (sc-credit memolines), which
shows if the return is accepted or refused.
So I've added a CAL Global (boolean) and also an option field to the request page. (show only accepted)
Now I have to write some CAL Code so that the report will only print / display all lines (accepted and refused) or just the accepted.
I'm pretty sure that I've have to put it in the OnAfterGetRecord-Trigger, but I have no idea about the syntax.
pls help
0
Best Answer
-
Hey p0wertube,
i think you get the error, because of the second line:
Try that:
IF NOT ("Sales Cr.Memo Line"."Return Operation" = "Sales Cr.Memo Line"."Return Operation"::Approved)
Question:
Do you just need to filter for the Return Operation Field?5
Answers
-
I tried this, but I get the error message: "the prefix operator cannot be used on option"
IF showAccept THEN BEGIN
IF NOT "Sales Cr.Memo Line"."Return Operation"::Approved
CurrReport.SKIP;
END;
END ELSE
CurrReport.SKIP;0 -
If I understand it well, that boolean field it's in the table; so your users can filter for them like if they were filtering the customer name or something like that. You shouldn't need to do anything in code.0
-
Hey p0wertube,
i think you get the error, because of the second line:
Try that:
IF NOT ("Sales Cr.Memo Line"."Return Operation" = "Sales Cr.Memo Line"."Return Operation"::Approved)
Question:
Do you just need to filter for the Return Operation Field?5 -
Hey Aluan,
thanks that worked fine.
I have some more "hard" filters like (Type = Item) etc, but Return Operation is the only boolean filter on the request page
0
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