how to initialize the filters when we use custom filter section in a report definition
I have a report definition where i want all WO created in last 24 hrs and i want to use the custom filter section so that i can have validation on that that if the end user changes the filter - create date more than 24 hrs show him warning that he cannot do...
So everything works fine.. however firt time when i load the report from report viewer it do not initialize the filter as 24hrs... what is the best way to achieve this?
In your custom filter Section you can include a Section where the Page Context is sourced to "Data Page". That Data Page can invoke a query using an Activity that does an Obj-Browse. You now have a Data Page named, for example, "D_CustomerFilter", with a Property such as ".StartDate", the value for that Property having been previously persisted and now retrieved.
You now need to transfer that Data Page's ".StartDate" value to your Report Definition's Custom Filter Section.
Name the custom filter prefix "CustomFilter". Prior to the filter Section being launched in a modal window, a page named “CustomFilter” will have been created for use as its page context.
Following the Obj-Browse In your "D_CustomerFilter" Data Page's load Activity do:
.StartDate = D_CustomFilter.StartDate
The only thing you are still lacking is a way to persist the last-used ".StartDate" value.
You can define an "On-Change" action that persists the most recently set value. Only someone with a certain Access Role would be allowed to do this.