none
Save user's report parameters

    Question

  • Is it possible to save a user's report parameter choices so that it can be used again, let's say a week later when the user wants to run the report again?

    Thanks.
    Friday, April 24, 2009 6:33 PM

Answers

  • Hi Chris,

     

    I think cached instance and a snapshot will meet your requirement. Of course, you can create subscription for a user and send snapshot as subscription.

     

    If you were to select a report snapshot for the subscription, you wouldn’t be able to edit parameter values used as query parameters and I think this is what you want. The values in the rendered report for the subscription will match those of the snapshot. However, if the report parameter is used as a filter, you can modify it in a subscription.

     

    Hope this helps.

    Raymond

    Tuesday, April 28, 2009 2:21 AM

All replies

  • Hi,

     

    Are you looking for snapshot and cached parameter? You can create a cached instance, a snapshot or a report history for a report. A snapshot is created on a scheduled basis to update a report with more current data. As with a cached instance, query parameters are applied when the snapshot is created. A snapshot is not an interactive report, so parameter values cannot be changed once the snapshot has been created.

     

    You can create a snapshot manually or on a regular basis by using either a report-specific schedule or a shared schedule. However, only one snapshot at a time can exist. Each subsequent snapshot replaces the previous one. To configure a report to execute as a snapshot, you must select a data source that uses stored credentials for the report.

     

    A cached instance of a report is like a session report. Using a cached instance of a report reduces the number of queries to the source database and potentially improves the performance of report execution. In this case, Reporting Services starts the process with the intermediate format of the report, which is stored temporarily in the ReportServerTempDB database. This intermediate report is flagged as a cached instance and is used for rendering in response to subsequent requests for the same report until the cached instance expires.

     

    1.      In Report Manager, click the report.

    2.      Click the Properties tab, and then click the Execution link.

    3.      Click the third rendering option,

    “Cache a temporary copy of the report. Expire copy of report on the following schedule:”

     

    4.      And then configure the schedule. 

     

    Or you can select the option “Cache a temporary copy of the report. Expire copy of report after a number of minutesand then specify the minutes to be 10080

     

    For more information, please refer to:

    http://msdn.microsoft.com/en-us/library/ms178821(SQL.90).aspx

     

    Hope this helps.

    Raymond

     

    Monday, April 27, 2009 9:36 AM
  • Hi Raymond,

    Thanks for your reply. I looked at the directory tree on the left panel of MSDN and browsed around for something similar. Do you think this will do the job?

    http://msdn.microsoft.com/en-us/library/ms157306(SQL.90).aspx
    Monday, April 27, 2009 4:21 PM
  • Hi Chris,

    If the report is rendered in a ReportViewer, then when a report is rendered, you might be able to hook into, say, the RenderingComplete event and use the ServerReport.GetParameters method to get the parameters that were used. When you have the parameters, then you could save them to a store (e.g., config file or database). The next time a user runs the report, you could retrieve the parameters from the store and use the ServerReport.SetParameters method to initialize the report parameters.
    • Proposed as answer by InfiniteJoy Tuesday, November 01, 2011 3:29 AM
    Monday, April 27, 2009 5:30 PM
  • Hi Chris,

     

    I think cached instance and a snapshot will meet your requirement. Of course, you can create subscription for a user and send snapshot as subscription.

     

    If you were to select a report snapshot for the subscription, you wouldn’t be able to edit parameter values used as query parameters and I think this is what you want. The values in the rendered report for the subscription will match those of the snapshot. However, if the report parameter is used as a filter, you can modify it in a subscription.

     

    Hope this helps.

    Raymond

    Tuesday, April 28, 2009 2:21 AM