I remembered having done it like this in an earlier version, but maybe i’m mistaking.
So i we don’t want any runtime-errors, we have to copy the filter into a string, and search for specific signs, to determine the structure of the filter…
Or what?
I don’t think that it is good idea to search in the string - there are lot of posibilities to make complex filters.
I think that if you really don’t want to get such error (which is not very understandable for user), you have to add Starting Date and Ending Date fields in to request form and test if user have entered them.
Or you can apply the filter to Date table “Starting date” field and try to find first entry. If it’s not 01/01/0000 then min. range exists.
I did not want to use the StartDate EndDate in the Options as it seems a bit crude. I am sure that it must be possible to find if the filter is “…311207” and if so, enter a MinDate that is say -3M the MaxDate.
That’s how I normally do it, if I want to make sure the user enters a date-range.
Maybe, if this can apply to the report, You can make a lookup to the Accounting Periods in the options-tab.
And then calculate the StartDate & EndDate in OnPreReport.