I have read like, we can create multiple snapshot for a SSRS report.But we have to create a default value as a filter if exist.So my question is,at first we add a default value in parameter and deploy the report and set the snap shot option.Then what is meant by multiple snap shots?At a time we have only one default value right?So multiple snapshot means same data will be there for all snapshot right? Also,How can we create mutiple snapshot?
Snapshots are meant for using the same default parameters and having them run on a schedule. That would be useful for a report where the data changes every day and you want to keep a snapshot from every day. Not useful if your data never changes and you want to use different parameter values.
The other option is to use a "Cache refresh plan". You can set up different schedules and different parameter values for these and set it to cache a temporary copy of the report that expires after a day or whatever you like (in minutes).
I use the second option for a report which takes about 30 seconds to run. This is too long for the user (Senior Manager) so I have it set to run at 7am every day and then just show that same cached report to the manager all day no matter how many times the report is run.
Related
Lets say I have some function get_inventory_report() that pulls a report from a server and updates values in my database.
I only want to get the report once every 24 hours so I need to somehow store the date and time that the report was pulled and then have a function like should_pull_inventory_report() which simply checks if the time that the report was last pulled is greater the set pull frequency.
I'm thinking the report pull frequency can be stored in a table called config, but what I'm not sure of is where or how to store the value for when the report was last pulled.
Essentially, I want to log the time and date of last successful executions of functions (report pulls, API requests) somewhere so that they can later be referenced to determine if enough time has passed that the function needs to be called again.
I have created a report which represents daily sales. It has a Date parameter. Users of this report want it to renew, for instance, each hour, without clicking anywhere, and show results on the screen. They don't want to receive it by mail, they want to see it renewed version each hour on browser.
If it didn't have any parameter, I heard that it is possible to arrange schedule in browser itself, but it has a parameter (Date).
Is there a way to do this? Thanks in advance for any help.
Agreed with SFrejofsky to be careful about DB security. When I've needed to do this in the past though, there is a report auto refresh property that you can set that worked well.
Click anywhere outside of the report. Then in the report properties pane (if not already displaying... with report selected, press F4, or go to View-->Properties Window) set the auto refresh property (in number of seconds) to how often it should refresh (in your case... 1 hour... set to 3600), then with the report rendered, any new data since report first rendered or last refresh, should display upon the refresh.
I've done this when users run a report that they leave open for a bit and new data is being sent to the DB every couple minutes or less and they want it refreshed like every 30 seconds. I'd be curious though about the need to keep the report open for so long and a required auto-refresh of an hour.
Hope that helps.
I have to post a comment to your comment as an answer because I don't have enough reputation yet to add a commemt.
I went back to reports that I did as I described above. I see that the reason it worked in my cases is because there is a date range for the reports (from datetime and to datetime) which are defaulted to today at 12am to today at 11:59pm. So the reason this worked in my case is because when the business users are looking at this during the day, the new records will display, as they will still fall within that datetime range. All parameters for the report have default values. I tried changing one of the datetime values and running the report. It ran with the new datetime value, but each time it refreshes (every 30 seconds), the datetime doesn't get reevaluated. This is due to a long standing issue(?) ...opened in April 2011... with SSRS and not reevaluating default parameters that are changed by the user, that many people out there have mentioned they would like, and have the need, to have control over, and Microsoft just always responding with... it is not a bug, this is working as designed, as there isn't a way, currently, of knowing if the parameter was changed by the user.
So in my case, this was suffice, but I can see that based on the report requirements, it may not be a viable solution in every case.
I have a report that uses parameters. The default parameters are defaulted to contain all available values, so by default the report the contains all possible data.
I want the user to then be able to deselect some of the values in the parameters, and to refresh the charts in the report, so they can drill down to the data that interests them.
But each time the report is refreshed, it runs the query again, slowing down the process.
Is there a way to allow the user to filter the data in the charts, without re-running the query?
I did find this, but it seems that he also didn't get a solution, or I didn't understand how the solution would work.
http://social.msdn.microsoft.com/Forums/en-US/0f905bdb-b8f2-4d9d-ac5b-e85d2f94f0cf/textbox-action-to-filter-existing-dataset-rather-than-rerun-query
To keep the query from running again, two high level steps must happen:
1) Make sure that your filters(parameters) are not included in the query. The query needs to be identical, no matter what the user has selected for a filter. This is done by moving the filters into the report. You can set them up as the filter on the tablix or on the row groups that are displaying the data.
2) Set up caching for the dataset. The easiest way to do this is by pulling the data set out of the report and create a "Shared Dataset." when you upload that to SSRS, define the dataset caching: maybe set it to last an hour. Connect the report to the shared dataset as well.
The full details of this can fill an article, such as http://www.mssqltips.com/sqlservertip/1919/how-to-enable-caching-in-sql-server-reporting-services-ssrs/ (for an old version of SSRS, but these concepts haven't changed much.)
I've been trying to get around this issue, and was hoping someone here might have paced the same problem.
My SSRS report has some default parameters that are set dynamically. What is happening is that when a report page is first opened (these reports are running from a custom web app), the 'main' report sproc is fired once, just to grab those 2-3 dynamic parameters, even though no other data from that sproc is displayed at this time (if this seems like overkill, it is...I inherited these reports from a former coworker who designed them). So, since there are 2-3 dynamic parameters, the report was designed to get these default values from a query. So, by the time the report is finally run by the user, the main sproc (just call it "report_getReportData" for simplicity) will have ran about 3-4 times already before it's ever rendered to the page.
What I did was, within the report_getReportData sproc, before doing my select * statement to display all the report data, I created a physical table to hold the 2-3 default values, and I created a new dataset in the report to just run a new sproc that just selects the value from this physical table, nothing else, so the result is the getReportData sproc only fires once, and my new sproc, let's call it 'report_getTwoParameters' fires once for each parameter, but the time cost is negligible since is just does one quick select statement.
This solved the issue of the overall report performance, but since there is now a physical table involved (report_getReportData returns data from a temp table), we face the issue of multiple users not being able to run this report simultaneously. So I guess my post has two questions:
1) Is there even a way to get around the main issue of having the report have to run report_getReportData just to set the 2-3 parameters - like maybe "multicast" the result set returned from the sproc into a couple different datasets or something?
2) If we decide to keep my solution of using the physical table, would anyone have any alternate solutions to this, in order for users to be able to run the report simultaneously but avoid bumping into this same physical table?
My situation is this - I'm using SSRS to create a "cascading" report set. The top-level report pulls all of the data from a table that capture our deployment/release activity. This data includes the property that executed a release, the organization to which that property belongs, the scheduled and actual start and end times of the release (and its constituent deployments), etc., etc., etc., and in the report I aggregate the data by time windows (Fiscal Year, then Quarter, then Month). So, at the top level, the user sees a report that shows how many deployments and releases we executed, how long they were expected to take, and how long they actually took, over the last twelve months, grouped, again, by Fiscal Year, then Quarter, than Month.
Now, the next level of detail the user wants to see is for a given month. When he or she clicks on the link to run that particular sub-report, they now get the same information (number of deployment, number of releases, scheduled and actual durations, etc.) grouped by organization, for that particular month.
Here's my dilemma - the initial report takes a LONG time to render. I would like to create snapshot report to reduce this render time, but my sub-report uses the Month from the top-level report as a parameter. In other words, when I click on the link to the sub-report, the Action setting in SSRS says to use the Month that I clicked on as a parameter to generate the sub-report, and the query in the sub-report filters off of that parameter with the following query condition:
AND FiscalQuarter IN (#Quarter)
So, the reporting works fine, but I am wondering - is there some way that I can get ALL of the data, for ALL quarters, into the sub-report in a snapshot report, and then just generate that snapshot but filtered out for the quarter value that I pass from the top-level report as a parameter?
yes you can, by creating a snapshot for sub report for all values.
and the parameter defined on the subreport should be a dataset filter not a query parameter .
Now when you pass parameter from main report to subreport , it will filter it accordingly on the sub report snapshot without having to execute the costly sql
Alas, reporting services does not provide what you need. Caching reports will create a cached version of the report per distinct combination of parameter values, and a similar situation holds for cached datasets.
You have roughly two options left it seems:
Use a cached dataset, have the subreport use the cached dataset but only use the parameter to filter the data once it's retrieved (e.g. in a tablix)
Resort to a more database-oriented caching-like or performance enhancing strategy such as for example indexed views for your queries