Don't want so save data item filters on report

mabl4367
Member Posts: 143
Hello everybody!
I have created a report with four data items. Usually the user will only enter filters in one of the data items. Data items with no filters will be skipped when the report is run. My problem is that if a user has run the report once and set some filters on one data item then the same filters will be present the next time the report is run.
I don't want the user to be forced to check all data item tabs to be sure that there are no old filters left.
Is there a way to not save the data item filters? Maby it is possible to clear them before they are saved.
I have created a report with four data items. Usually the user will only enter filters in one of the data items. Data items with no filters will be skipped when the report is run. My problem is that if a user has run the report once and set some filters on one data item then the same filters will be present the next time the report is run.
I don't want the user to be forced to check all data item tabs to be sure that there are no old filters left.
Is there a way to not save the data item filters? Maby it is possible to clear them before they are saved.
0
Answers
-
I still got nothing on this. Any one else?0
-
Forgot where I got this from. But essentially, you need to recompile the object in order to clear the filters:
ZapFile := 'C:\Zap.txt'; EVALUATE(ObjectNo,TxtObjectNo); IF Object.GET(ObjectType, '', [Object Number]) THEN BEGIN Object.CALCFIELDS("BLOB Reference"); Object."BLOB Reference".EXPORT(ZapFile); Object."BLOB Reference".IMPORT(ZapFile); Object.MODIFY; END;
Confessions of a Dynamics NAV Consultant = my blog
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book0 -
I tried this but it does not seam like the objekt is recompiled even if I export and import it. How can i trigger a recompile from code?0
-
There is no elegant way of doing this, you can try running it from codeunit like that:
DataItem1.RESET; DataItem2.RESET; DataItem3.RESET; DataItem4.RESET; TestReport.SETTABLEVIEW(DataItem1); TestReport.SETTABLEVIEW(DataItem2); TestReport.SETTABLEVIEW(DataItem3); TestReport.SETTABLEVIEW(DataItem4); TestReport.RUN;
0 -
I tried it but no luck! ](*,)0
-
I take my last post back. It works when I call the report from a codeunit like you suggested SLF25. :oops:0
-
Does anyone know why it doesn't work to reset the filters in the reports OnInitRreport trigger or the request forms OnInit or OnOpenForm triggers?0
-
SaveTableView property of the RequestForm? Should work.0
-
shoulda, woulda, coulda but doesn't
all the resets & clears too - I was surprised when I tried everything I could think of..I guess it's not usually a big deal.. so it's never been addressed by MS?0 -
:?:
The code I posted will work. It's in production for a few of our clients. What's the problem you're having?Confessions of a Dynamics NAV Consultant = my blog
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book0 -
He's got it working..mabl4367 wrote:I take my last post back. It works when I call the report from a codeunit like you suggested SLF25. :oops:0
-
Yes it's working and I have also found the same solution used in Relationship Management module. When adding, deleting or refining the contacts in a segment the Add conatcs report (5198) for example is cleared of all its filters in the same way before it's run from frm 5091 Segment.0
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