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?
-
Thursday, December 06, 2012 1:02 PM
The requirement is to retain the last entered value in Dynamic parameters for the next time report is to be run. The parameter dialogue box should display the last selected values and if required user can change.
Best Regards,
Rohit Kakkar
- Edited by Rohit Kakkar Thursday, December 06, 2012 1:06 PM
All Replies
-
Thursday, December 06, 2012 1:28 PM
Assuming you're using the Report Manager and not a custom .NET application, that's not really possible.
But you can achieve something similar using Linked Reports. When the user creates a Linked Report, he can set the parameters to his preference, a bit similar to a program shortcut.
More info: Create a Linked Report
MCITP SQL Server 2008 (DEV); MCTS SQL Server 2008 (BI, DEV & DBA)
- Proposed As Answer by Valentino Vranken Friday, December 07, 2012 2:44 PM
-
Thursday, December 06, 2012 2:08 PM
Hi Valentino,
We are using Crystal Report Viewer control for rendering the report.You are suggesting to design GUI in .NET for passing the parameters to the report. Please correct me, if my understanding is wrong.
Regards,
Rohit Kakkar
Rohit Kakkar
-
Thursday, December 06, 2012 2:49 PM
To avoid any misunderstanding, are you using something called "Crystal Reports Viewer" (seems a bit weird in the context of a SSRS forum?) or the ReportViewer control that can be used in a .NET application?
In case you've got a custom app in .NET, you could indeed design the parameter part yourself instead of relying on the generated controls of the ReportViewer.
MCITP SQL Server 2008 (DEV); MCTS SQL Server 2008 (BI, DEV & DBA)
-
Thursday, December 06, 2012 5:24 PMI'm using ReportViewer control defined in CrystalDecisions.Windows.Forms, in my .NET (Win based application).
Rohit Kakkar
-
Friday, December 07, 2012 2:49 AMModerator
Hi Rohit,
From you description, you want to display use name that run the report last time on the report, right? Reporting Services display data that retrieve form database, if the user name has not be stored into database, I am afraid your requirement cannot be achieved in Reporting Services currently. The use name store in the report cannot be retained to the next time to run the report. This is because when we run the report again, everything will be initialized. We can insert use name into database using report, but this is not recommend for the reason that Reporting Services is a platform that used to display data form database, for more information about it, please see:
http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/c34a8e4e-77b9-4d1f-a8ef-96608761d5e9/Hope this helps.
Regards,
Charlie LiaoIf you have any feedback on our support, please click here.
Charlie Liao
TechNet Community Support- Proposed As Answer by Shahfaisal Muhammed Friday, December 07, 2012 2:31 PM
- Marked As Answer by Charlie LiaoMicrosoft Contingent Staff, Moderator Friday, December 14, 2012 12:58 AM
-
Friday, December 14, 2012 11:30 AM
This requirement can be achieved if you can store the username and the parameter value in a database.
Then you can use stored procedures to fetch the latest chosen value for the parameter.More info:
Report Parameter Selection Memory
MCSA SQL Server 2012 - Please mark posts as answered where appropriate.

- Proposed As Answer by Valentino Vranken Friday, December 14, 2012 11:45 AM
-
Friday, December 14, 2012 2:30 PM
I know this has been answered but absolutely yes because I have done this!
You can even do this per user, per report if you want.
1. Create a new table that will store the parameter value and the userid.
2. Create a new report with two parameters, paramvalue, userid. Create a data set for this report but instead of a select query, make it as an insert statement inserting the value of the two parameters this report will accept.
3. Include this new report as a sub report on the report where you want to retain the parameter values. I put it at the bottom of the page. It has no output.
4. Pass the paramvalue and userid from your main report to the sub report.
5. Set the default value of your parameter by specifying a query to pull the last paramvalue by userid stored in the table when the report was last ran.
It will work like a charm.


