Is it possible for one report to have different default parameters, based on the user viewing the report, when the report is accessed via the Report Viewer
Thanks.
accessed acceded accused accedes accursed Edit... Ignore all Add to dictionary(No suggestions) Edit... Ignore all Add to dictionary
accessed acceded accused accedes accursed Edit... Revert to "accesed"
Assuming you are asking for viewing report through report server: default values can be (1) constant, (2) expression-based, or (3) dataset based.
Regarding (2): you could determine the default value based on the current userid, e.g =iif(User!UserId="abc", "Default1", "Default2")
Regarding (3): you could use the current user information in the query commandtext or as parameter into a stored procedure to dynamically determine the default value.
Report Viewer/Default Parameters
DaaDa Ng
If you are using the ReportViewer control in ASP.NET, you can set the value of the parameter programatically based on the current user identity:
this.ReportViewer1.ServerReport.ReportPath = "/SampleReports/Employee Sales Summary";
ReportParameter p = new ReportParameter("EmpID", "20");
this.ReportViewer1.ServerReport.SetParameters(new ReportParameter[] { p });
Richard Curley
Assuming you are asking for viewing report through report server: default values can be (1) constant, (2) expression-based, or (3) dataset based.
Regarding (2): you could determine the default value based on the current userid, e.g =iif(User!UserId="abc", "Default1", "Default2")
Regarding (3): you could use the current user information in the query commandtext or as parameter into a stored procedure to dynamically determine the default value.
-- Robert