早上好。
我试图在我的ReportServerUrl上添加rv命令,但这会导致在设置参数时发生错误。这样做的目的是因为打印按钮没有出现在报表上。这就是为什么我试图将工具栏模式设置为0。
Code
viewer.ServerReport.ReportServerUrl = new Uri(WebConfigurationManager.AppSettings["SSRS_ReportServerUrl"]);
Uri builder = new Uri(viewer.ServerReport.ReportServerUrl.ToString() +"?/&rv:ToolBarItemsDisplayMode=0");
viewer.ServerReport.ReportServerUrl = builder;
viewer.ServerReport.ReportPath = reportPath;
viewer.ShowCredentialPrompts = false;
SetupDataSource(viewer, "ClientDS", DatabaseServerName, groupDatabaseName, groupDatabaseUserName,
groupDatabasePassword);
parameter sets
viewer.ServerReport.ReportServerCredentials = new SSRSNetworkCredentials();
var p = new ReportParameter[2];
p.SetValue(new ReportParameter("DBServer", server), 0);
p.SetValue(new ReportParameter("DBCatalog", catalog), 1);
viewer.ServerReport.SetParameters(p);