protected void treeMenu_SelectedNodeChanged(object sender, EventArgs e) { try { if (treeMenu.SelectedNode.IsNotNull() && treeMenu.SelectedNode.ImageToolTip.IsNotNullOrEmpty()) { ReportSuite.BLL.ReportSuite reportSuite = new ReportSuite.BLL.ReportSuite(ASL.STATIC.ConnectionName.HR); String reportPath = String.Empty; reportPath = AppDomain.CurrentDomain.BaseDirectory + "ASTReports\\" + treeMenu.SelectedNode.ImageToolTip; Session["reportPath"] = reportPath; if (System.IO.File.Exists(reportPath).IsFalse()) { Response.Write("File does not exist."); return; } ParameterValues = new DataSet(); ParameterValues = reportSuite.LoadReportParameterInfoFromDB(treeMenu.SelectedNode.Value.ToInt()); ParameterValues.Tables[0].TableName = ParamTableName; Session["ReportID"] = treeMenu.SelectedNode.Value.ToString(); SubReportList = new List <RDLReportDocument>(); Report = new RDLReportDocument(treeMenu.SelectedNode.Text); Report.ReportPathWithOutName = treeMenu.SelectedNode.ToolTip; Report.Load(reportPath); Report.LoadFilterTable(ParameterValues.Tables[ParamTableName].Columns); FilterSetList = Report.FilterSetList; } } catch (Exception ex) { ((PageBase)this.Page).ErrorMessage = (ExceptionHelper.getExceptionMessage(ex)); } }
protected void Page_Load(object sender, EventArgs e) { try { if (enterintoLoadEvent.IsFalse()) { return; } if (IsPostBack.IsFalse()) { FilterSetList = new CustomList <FilterSets>(); FilterValueList = new CustomList <ParameterFilterValue>(); ReportSuite.BLL.ReportSuite reportSuite = new ReportSuite.BLL.ReportSuite(ASL.STATIC.ConnectionName.HR); string empcode = Request.QueryString.Get("empCode"); string empKey = Request.QueryString.Get("EmpKey"); if (empcode.IsNullOrEmpty()) { ReportMenuList = reportSuite.GetReportSuiteMenu(CurrentUserSession.UserCode); } else { ReportMenuList = reportSuite.GetReportSuiteMenu(); } LoadMenu(); treeMenu.CollapseAll(); if (treeMenu.Nodes.Count > 0) { treeMenu.Nodes[0].Expand(); } } } catch (Exception ex) { //Message.ShowErrorMessage("Error: <br>" + ex.Message + "<br>Call Stack: <br>" + ex.StackTrace); } }