示例#1
0
        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;
            }
        }
示例#2
0
        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));
        }
示例#3
0
        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));
        }
示例#4
0
 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];
     }
 }