protected void ddlistReports_SelectedIndexChanged(object sender, EventArgs e) { if ("True" == Session["viewRptActive"]) { rptViewerMain.Reset(); Session["viewRptActive"] = false; } List <ReportParameter> m_ParamList = new List <ReportParameter>(); ListItem selItem = ddlistReports.Items[ddlistReports.SelectedIndex]; _InitRptsessionVars(); if (ddlistReports.SelectedIndex > 0) { AwareSecurables aws = new AwareSecurables(m_AppSettings.GetAwareDbConnectionString); Session["SelectedReport"] = aws.GetObjectNameByPresNameObjType(selItem.Text, (int)AwareObjectTypes.REPORT_DEFINITIONS); _ClearAllDropDownsOnRptChange(); } else { Session["SelectedReport"] = null; } rptViewerMain.Reset(); _ShowHideReportParams((string)Session["SelectedReport"]); }
private void _InitReportSecurables() { m_rs.Credentials = System.Net.CredentialCache.DefaultCredentials; m_rs.Url = m_AppSettings.GetReportServerUrl.ToString(); try { CatalogItem[] items = m_rs.ListChildren(string.Format("/{0}", m_AppSettings.GetReportsRootFolder), true); AwareSecurables aws = new AwareSecurables(m_AppSettings.GetAwareDbConnectionString); foreach (CatalogItem ci in items) { if (RS_REPORT_TYPE == ci.TypeName) { if (false == aws.DoesSecurableExists(ci.Name, (int)AwareObjectTypes.REPORT_DEFINITIONS)) { string presName = _GetRptPresentationName(ci.Name); aws.AddSecurable(ci.Name, (int)AwareObjectTypes.REPORT_DEFINITIONS, presName); } } } } catch (Exception ex) { Session["LastError"] = ex.Message; Session["InnerExceptionText"] = ex.InnerException.Message; Response.Redirect("AwareError.aspx"); } }