Is it possible to set a defualt value for a report filter? At the moment I filter using a date range calculated using code (first day of month-last day of month), but I want make possible for end user to change this range.
Basically, you have to filter a record-variable, and call the report, when passing this record variable to the report.
It's weekend now, and it's about 12:55 AM, and I'm working with Linux at the moment ... so I can't test or look up an example, but if this doesn't work ... just let me know, and I'll look it up on Monday ... :whistle:
Basically, you have to filter a record-variable, and call the report, when passing this record variable to the report.
It's weekend now, and it's about 12:55 AM, and I'm working with Linux at the moment ... so I can't test or look up an example, but if this doesn't work ... just let me know, and I'll look it up on Monday ... :whistle:
I know this method...but I want to set a default value in the form that appear reporting field filter just before create a report... in this manner the user have yet a date range and if he want he can modify it.
You could do this by creating a new function (eg, SetParameters) in the report, and calling this function before running the report (RUNMODAL), for exemple:
You could do this by creating a new function (eg, SetParameters) in the report, and calling this function before running the report (RUNMODAL), for exemple:
Ok, maybe I don't express my problem in a good way...
My problem is how can I set a default value for a filter on the request form of the report that appear at report run?? I want that my calculated date range appear as proposal instead of the last data range inserted by user.
Comments
Basically, you have to filter a record-variable, and call the report, when passing this record variable to the report.
It's weekend now, and it's about 12:55 AM, and I'm working with Linux at the moment ... so I can't test or look up an example, but if this doesn't work ... just let me know, and I'll look it up on Monday ... :whistle:
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
I know this method...but I want to set a default value in the form that appear reporting field filter just before create a report... in this manner the user have yet a date range and if he want he can modify it.
You could do this by creating a new function (eg, SetParameters) in the report, and calling this function before running the report (RUNMODAL), for exemple:
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
Ok, maybe I don't express my problem in a good way...
My problem is how can I set a default value for a filter on the request form of the report that appear at report run?? I want that my calculated date range appear as proposal instead of the last data range inserted by user.
On the request form ... OnInit or OnOpenForm
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
<Control1000000095> - OnPush()
Cust.SETRANGE("No.","No.");
Cust.SETFILTER("Date Filter",'..%1',WORKDATE);
REPORT.RUN(REPORT::Statement,TRUE,FALSE,Cust);
Hope this helps.
Colin