Want to display filter Value on Report.

JAYESH
Member Posts: 290
HI Experts,
I want to know how to display value which we put to filter records on the Reports Heading Section.
For eg . I put filter on Date field - 010101..010107 at report run time.
I want to display 010101..010107 on the Report Heading.
I request you to please share your ideas.
Thank you
I want to know how to display value which we put to filter records on the Reports Heading Section.
For eg . I put filter on Date field - 010101..010107 at report run time.
I want to display 010101..010107 on the Report Heading.
I request you to please share your ideas.
Thank you
JAYESH PATEL
0
Comments
-
use this report as an example
try report 10143 Item list
it prints the item filter that was set
basically create a text variable called ItemFilter
then on the pre-report trigger put
ItemFilter := Item.GETFILTERS;
then place on the header of your report the field0 -
Search forum for "GetFilters" for lots of posts
http://www.mibuso.com/forum/search.php
you can also read the C/side Ref Guide about GETFILTERS
also you can also look at other standard reports that do what you ask, to see how they were done.0 -
Thanks a lot..:)JAYESH PATEL0
-
-
Hi,
I know GETFILTERS but I want to print all the filters applied in all indented dataitem in the header of level 0 . Is that possibile and how?
GETFILTERS prints blank if it is not inserted in each dataitem section.
Thank you0 -
I'm rather new to navisin but i think you could copy your data item structure and insert the copy before the original. Remove all sections refering to the copy and put a CurrReport.BREAK; statemet in all the data items OnAfterGetRecord triggers of the copy. In these triggers you will have access to the filters set in the requestform. Put some statements in there to save the filters in variables. Then print the contens of the variables in the sections belonging to the original data items.
This way the report will run twice but the first time nothing will be processed. This is only done to get the filters.
It might be that the filters of the first instance of the dataitems are not the shared with the second one. If so use the filters saved in the variables to copy the first set of filters into the second one and remove the tab for the original items from the request form.
This is an ugly solution but I think it might work.0 -
Hi Andy,
in the Report - OnPreReport you could do this
FilterString := DataItem.GETFILTERS + ' ' + DataItem1.GETFILTERS + ....;
Albert0 -
note that you will get an overflow error if the sum of your filters exceeds the length of your variable.
for that reason, i usually do something like this OnPreReport
FilterString1 := COPYSTR(DataItem1.GETFILTERS,1,MAXSTRLEN(FilterString1));
FilterString2 := COPYSTR(DataItem2.GETFILTERS,1,MAXSTRLEN(FilterString2));
...
FilterStringN := COPYSTR(DataItemN.GETFILTERS,1,MAXSTRLEN(FilterStringN));
where FilterStringN is a text variable of length 250.
i would then give each FilterString variable it's own section and code so that it does not print if the FilterString variable is empty (= '').kind of fell into this...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