Reputation: 27
I use a parameter field value in a main report and 3 subreports, this is a value like 20121016, in one of the subreports i want to overrule this value 20121016 and or +1 and or -1 so that the result of the record selection for this subreport is more variable. Can anybody help please!
Upvotes: 0
Views: 538
Reputation: 3850
You can just add a maximum and minimum parameter in the sub report then add two new formulas, one deducting a day and one adding a day to the date:
Dateadd("DAY",1, {?MyDate})
Dateadd("DAY",-1, {?MyDate})
And pass these to the sub report.
In the sub report record selection do something like:
{MyTable.MyDateField} >= {?MinDate} and
{MyTable.MyDateField} <= {?MaxDate}
Upvotes: 1