protected void Page_Load(object sender, EventArgs e) { new SessionManager().IsSessionActive(this.Response, this.Session); Response.Cache.SetCacheability(HttpCacheability.NoCache); if (Session["fromwhere"] != null) { mMain.Visible = true; } if (Session["report"] != null) { XtraReport report = Session["report"] as XtraReport; report.CreateDocument(); //report.RequestParameters = true; docViewer.EnableViewState = false; docViewer.ReportTypeName = report.GetType().ToString(); docViewer.Report = report; docViewer.Visible = true; } if (Session["document"] != null) { docViewers.Src = Session["document"].ToString(); docViewers.Visible = true; } }
public static string GetReportPath(XtraReport fReport, string ext) { Assembly executingAssembly = Assembly.GetExecutingAssembly(); string name = fReport.Name; if (name.Length == 0) { name = fReport.GetType().Name; } return(Path.Combine(Path.GetDirectoryName(executingAssembly.Location), name + "." + ext)); }
private static XRTableCell GetCell(XtraReport report, string cellName) { const BindingFlags flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance; FieldInfo nameFieldInfo = report.GetType().GetField(cellName, flags); if (nameFieldInfo == null) { throw new ApplicationException(string.Format("Could not find XRTableCell {0} in report", cellName)); } return((XRTableCell)nameFieldInfo.GetValue(report)); }
public ReportWindowViewModel(MethodsEntities MethodsEntities, XtraReport xr, int anl_id) { this.methodsEntities = MethodsEntities; this.xr = xr; this.anl_id = anl_id; reportName = xr.GetType().Name; RaisePropertyChanged(() => reportData); //все строки таблицы для заданных отчёта и счёта RaisePropertyChanged(() => listLabel); //все метки из пред.коллекции if (listLabel.Any()) { selectedLabel = listLabel[0]; } }