コード例 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            CrystalReportTransaction rpt = new CrystalReportTransaction();

            rpt.Site = this.Site;
            return(rpt);
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Member currentUser = (Member)Session["userLogin"];

            if (currentUser == null)
            {
                Response.Redirect("Home.aspx");
            }
            else if (currentUser != null)
            {
                if (currentUser.Type == "Admin")
                {
                    CrystalReportTransaction tr = new CrystalReportTransaction();
                    CrystalReportViewer1.ReportSource = tr;
                    tr.SetDataSource(GetData(TransactionController.getAllTransaction()));
                }
                else if (currentUser.Type == "Customer")
                {
                    CrystalReportTransaction tr = new CrystalReportTransaction();
                    CrystalReportViewer1.ReportSource = tr;
                    tr.SetDataSource(GetData(TransactionController.getTransactionByEmail(currentUser.Email)));
                }
            }
        }