Thanks, but the issue is that havign the assing in the preparation before the aggregate also doesn´t work correctly.
To explain better the scenario:
There are two inputs StartDateInput and EndDateInput. When the user selects the dates and click in the "Search" button, the table should show the records according to this. This is working, the only issue is showing the default value of the StartDateInput input as the current date minus 1 month.
There is a variable StartDate to hold the value in the StartDateInput and an EndDate variable to hole the EndDateInput.
The StartEndInput should start with the current date minus 1 month. However, set the default value of the variable StartDate as AddDays(date, -30), shows "Default value must be set to a Date literal value".
To solve the issue I add an assign in the preparation before the aggregate with:
StartDate = AddDays(date, -30)
EndDate = CurrDate()
However this dont work correctly because like this when the user click "Search" the value of the StartDate variable is always AddDays(date, -30) and the value of the EndDate is always CurrDate() because he preparation is executed, so the aggreagate returns always the same reults independently of the dates that the user selected.