if (IsPostBack) return;
<rsweb:ReportViewer ID="rvPriceListDetails" BackColor="White" runat="server" ProcessingMode="Remote" Width="100%" ZoomPercent="100" AsyncRendering="true"> </rsweb:ReportViewer>
private void InitializeReportCredentials() { string server = ConfigurationManager.AppSettings["ReportServer"]; string reportpath = ConfigurationManager.AppSettings["ReportsFolder"]; string username = ConfigurationManager.AppSettings["Username"]; string password = ConfigurationManager.AppSettings["Password"]; string Domain = ConfigurationManager.AppSettings["Domain"]; rvPriceListDetails.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; if (IsPostBack) return; rvPriceListDetails.ServerReport.ReportServerUrl = new System.Uri(server); rvPriceListDetails.ServerReport.ReportPath = string.Concat(reportpath, ReportName); rvPriceListDetails.ShowParameterPrompts = true; rvPriceListDetails.ServerReport.ReportServerCredentials = new ReportCredentials(username, password, Domain); rvPriceListDetails.ServerReport.Refresh(); ReportParameter UserName = new ReportParameter("UserName", SessionManager.Current.UserObject.UserName); rvPriceListDetails.ServerReport.SetParameters(new ReportParameter[] { UserName }); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)