Hello,
We have a number of reports configured to show sales data from last week, last month, last quarter, etc. The date parameters all work off of a CurrentDate = Now() expression, and extrapolate from there for the different time periods required (AddDays, AddMonths, etc). All of these work perfectly when used on-demand. However, if I set up a subscription/scheduled report, the date parameters don't seem to get refreshed. I made sure that the CurrentDate parameter was ordered as the first parameter to be run, but that didn't seem to make a difference. The report runs on the scheduled date and time, but the data that it's returning is not relevant. Is there any way to make sure that those date parameters get refreshed before the scheduled report runs?
Thanks
Travis
9 Answers, 1 is accepted
I tested the described scenario with a simple report (attached - DateTimeNow.trdp) displaying the values of two report parameters, the first one (CurrentDate) with value "=Now()", the second (PastMonth) with value depending of the first parameter "= AddMonths(Parameters.CurrentDate.Value, -1)".
I uploaded the report in the report server and scheduled a task to send the report daily. The report was rendered with the correct Date values - both when send as scheduled, and when run from the "Execute" button of the Report Server Manager.
The report parameters are evaluated early in the report processing stage - check Report Life Cycle. The value of the parameter will be set according to its assigned Expression. The Now() function will get the current Date/Time, hence on each execution the CurrentDate parameter should have a fresh value.
In scheduled tasks we do not use caching, hence I exclude also this possibility.
If the problem persists consider opening a support ticket where to attach a sample runnable report reproducing the issue so that we may investigate locally.
Regards,
Todor
Progress Telerik
Thank you Todor for your reply. Respectfully, your example doesn't encompass our issue. Your PastMonth parameter is going to be correct because nothing has changed. If you were to use a Yesterday expression, or LastWeek, you may see our issue. Or, you'd have to wait until the current month has changed, and then look at the values being returned in the scheduled report.
For the time being, we have amended our SQL query to calculate the specific date ranges needed for our reports. I will create a sample report and upload to a support ticket for further investigation.
1) In Report server I should able to create a Record with one of special character which is not happening
2)For Monthly And Yearly schedules BYSETPOS in UI not getting selected when value has been posted using Telerik CreateSchdule API
1) In Report server Under Categories-I should able to create a Record with one of the special character which is not happening
2)For Monthly And Yearly schedules BYSETPOS in UI not getting selected when value has been posted using Telerik CreateSchdule API
Hello Nagendra Kumar,
I'm afraid the described challenges are not very clear. Can you specify which is the special character that you would like to use and that doesn't seem to appear?
Regarding the Report Server Web API, you may see the Scheduled Tasks management endpoint in the linked article. Can you elaborate on what you expect to be updated when using the Web API, but doesn't actually get updated?
Regards,
Todor
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Hi Todor,
The Report Server Ui is some what acurate on populating the Recurrence Rule, which
actually helped me to correct the way on how I am preparing and sending the recurrenceRule from
API where I had a deviation in understading. I am sorry, as my mail and screen shots are at high level and towards at level
my undersanding as I analysed the Requriements on Mapping recurrence rule of report server based on the parameter scopes given by and at my level of experience which I am able to rectify now.
Thanks a lot for your reply
I am looking towards the Report Document Formats now.
Hi Todor,
The BYSETPOS value is not getting populated IN Report Server UI for both monthly and yearly scenarios using Telerik Report Server Create Schdule API-
POST api/reportserver/v2/scheduledtasks - REST API Documentation | Telerik Report Server
Details in Steps-
1)A Schdule Record is being created & saved using Report Server Create Schdule API mentioning specific Week-Name (out of SU,MO,TU,WE,TH,FR,SA) FOR THE RepeatON - Nth Week Position option
After that , if we view the same In The Telerik Report Server's - UI, it is showing Repeat-on- Nth Week Position(SETBYPOS) as Empty,
Making a Get Request with the Below API showing the JSON as below with Recurrence Details-
http://XXXXX/api/reportserver/v2/scheduledtasks
{
"Id": "238b61c4387",
"UserId": "c215f70d019642a9a162a1bbc9d5e2d8",
"Name": "This is for Product Sales",
"Enabled": true,
"Reports": [
{
"ReportId": "3c5b96c0355",
"DocumentFormat": "XLS",
"Parameters": {}
}
],
"StartDate": "2021-03-22T01:33:00",
"RecurrenceRule": "FREQ=MONTHLY;INTERVAL=2;BYDAY=WE;BYSETPOS=3;WKST=SU",
"LocalUsersMailTemplate": {
"Subject": null,
"Body": null
},
"ExternalUsersMailTemplate": {
"Subject": null,
"Body": null
},
"ExternalEmails": [
"nbattiprolu@osidigital.com"
],
"SubscriberIds": []
}
Later, to cross verify the change has been explictly imposed by editing in Report Server UI with the desired value(BYSETPOS=3) & saved the same from Report Server UI.
The UI is retaining the imposed change with the desired value
Making a Get Request again with the Below API showing the JSON with Recurrence Details-
http://XXXXX/api/reportserver/v2/scheduledtasks
Result:-
{
"Id": "238b61c4387",
"UserId": "c215f70d019642a9a162a1bbc9d5e2d8",
"Name": "This is for Product Sales",
"Enabled": true,
"Reports": [
{
"ReportId": "3c5b96c0355",
"DocumentFormat": "XLS",
"Parameters": {}
}
],
"StartDate": "2021-03-22T01:33:00",
"RecurrenceRule": "FREQ=MONTHLY;INTERVAL=2;BYDAY=WE;BYSETPOS=3;WKST=SU",
"LocalUsersMailTemplate": {
"Subject": null,
"Body": null
},
"ExternalUsersMailTemplate": {
"Subject": null,
"Body": null
},
"ExternalEmails": [
"nbattiprolu@osidigital.com"
],
"SubscriberIds": []
},
Compared the BOTH result JSON & the both files ARE IDENTICAL
Please share if any infomation available on the same, or its an issue
Hi Nagendra Kumar,
Thank you for sharing your findings with us. I confirm that I managed to reproduce the problem locally. I have logged it as a new bug report and voted on your behalf - When you create a Scheduled Task with the Report Server API, the day of the week in the recurrence rule is not shown by the Report Server Manager. As a token of gratitude, we have updated your Telerik points.
Regards,
Todor
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.