Issue 1:
I have a report parameter StartDateTime. I set the default value to Now(). When I go to preview, the StartDateTime parameter is empty and its been locked. I am not even able to set it to different value in preview.
Can anyone help me how to set the datetime parameter to default value(Now).
Issue 2:
I have a stored procedure which takes StartDateTime parameter. Whenever the report refreshes using autorefresh interval, the startdatetime should default to Now. Right now the startdatetime defaults to whatever the value is there before i hit view report. how to do that using stored procedure.
Thanks fro your help.
I don't know about Issue 2, but are you using "=Now()" to populate the StartDateTime report parameter? Also, is the report parameter type set to "datetime"? I think fixing Issue 1 should automatically solve Issue 2 since it looks like the report isn't populating with the correct default date value.|||hey, Thanks for u'r reply. Now it started working. I mean using "=Now()" I could set the default value of StartDateTime.
Regarding Issue2, Whatever the value is there in the StartDateTime, its retaining for autorefresh. Its not taking the CurrentDateTime.
|||Suppose the user enters a date for the startdate, and then the report refreshes. I assume that in that case you do not want the start date to change when the report .
If my assumption is correct, I think the best way for you to accomplish this would be to set the parameter to allow a null value, and use null to indicate that the user wants to run the report using the current time. This way, when the report refreshes the startdate will still be null, and the report data will adjust.
Unfortunately, there is no way to have the parameter show the current time and return null, and still allow the user to enter a date manually.
|||
Thanks for your reply. There is more clarification from the customer on the requirements. Little bit of changes to the original question I posted..
We are trying to use a SSRS report as a dashboard on a TV screen. I am facing two issues that I need advice on
Issue 1 : We are using End Date Time and Duration as user selectable parameters. We autorefresh the report once every 15 minutes using report properties refresh. Essentially the customer wants a rolling time window report the auto refreshes.
If we use Now() function for End Date Time, at the end of the 15 minutes it still uses the the time from first time instead of the time at the refresh. How do I fix this?
Issue 2: We are using a custom ASP.NET appliction in which the SSRS Report Viewer displays the report. When the report refreshes, it does not retain the window scroll position. How can I fix it?
Thanks in advance.
|||Sorry it took so long for me to get back to you. hopefully you found a solution already, but if not here are my thoughts:
The first issue is actually two issues:
How to get a report to run using a 'rolling time period' on auto-refresh, and
how to get the parameters to change at refresh so that they match the reporting period.
The solution to the first is outlined above. Instead of using now(), use getdate() in your sql query.
The solution to the latter is more difficult, if not impossible. I would suggest not displaying the reporting period in the parameters (you can put it in the body of the report or something.)
I have had some luck in the past getting parameters to refresh if I put them in the available values instead of in the default values, but that doesn't seem to be working for me when I ran a quick test, so either I've forgotten how to do it, or I never actually got it to work the first time.
I'm not sure what the best way to approach the second problem is. Can you intercept the scroll events, or are they happening inside the ssrss viewer?
sql
No comments:
Post a Comment