Hi Eduardo, hi bpeikes,
Here are the details & results of my tests:
The report is based on the internal ReportServer database and should return reports executed in the set date & time range.
The report query:
SELECT E.DATE_FIELD, P.VALUE, R.NAME_FIELD
FROM RS_AUDIT_LOG_ENTRY E,
RS_AUDIT_LOG_PROPERTY P,
RS_REPORT R
WHERE
E.ENTITY_ID = P.LOG_ENTRY_ID
AND
P.VALUE IS NOT NULL
AND
P.VALUE = CAST(R.ID AS VARCHAR)
AND
E.ACTION = 'REPORT_EXECUTION'
AND
P.KEY_FIELD = 'report_id'
AND
E.DATE_FIELD BETWEEN ${startDate} AND ${endDate}
Formulas for the parameters:
startDate: ${today.addDay(-1)}
endDate: ${today}
In all cases the scheduler was set to send e-mail with CSV output. On 04.01 I executed all jobs manually, then on 5th and 6th they were executed automatically.
I created the following cases:
Case 1
I created a variant, saved it, leaving the parameters untouched (i.e. they were calculated by the formulas) and scheduled.
Initially the parameters were automatically set to 03.01.2016 and 04.01.2016.
Expected result: the report should contain data about reports executed on and only on the day prior the date of the job execution.
Result: as expected on all days
Case 2
I created a variant, saved it, leaving the parameters untouched (i.e. they were calculated by the formulas) and scheduled. Then I saved the variant again.
Initially the parameters were automatically set to 03.01.2016 and 04.01.2016.
Expected result: the report should contain data about reports executed on and only on the day prior the date of the job execution.
Result: as expected on all days
Case 3.
I created a variant, saved it, and scheduled, then I left the second parameter untouched and I manually set the first parameter to 02.01.2017 . Then I saved the variant again.
Expected result: ?
Result: reports executed by the job on all days included data about reports executed from 02.01.2017 till the date prior to the job execution date.
Case 4.
Similar to case 3. The difference: the first parameter was changed after first job execution. Then the variant was saved.
Expected result: ?
Result:
During the first job execution the report contained data only from the day prior to the job execution.
After the change of the parameter, all jobs returned reports with data about reports executed from 02.01 to the day prior of the date of the job execution.
For me it means that RS recalculates the parameters according to the default formulas, unless a user changes the parameter(s) manually. If the parameters are changed for the report variant attached to the existing job, further job executions reflect the parameters’ change.
Note, that in case of manual change of the parameter(s), the info mark next to the date field disappears.
I’d say we don’t have any bugs here.
Cheers,
Karolina