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

            rpt.Site = this.Site;
            return(rpt);
        }
コード例 #2
0
        private void frm_active_guards_report_Load(object sender, EventArgs e)
        {
            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;

            cr_active_guards_by_station report = new cr_active_guards_by_station();

            ParameterFields        paramFields        = new ParameterFields();
            ParameterField         paramField         = new ParameterField();
            ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();


            foreach (CrystalDecisions.CrystalReports.Engine.Table tbCurrent in report.Database.Tables)
            {
                Set_Report_logons.SetTableLogin(tbCurrent);
            }

            report.SetDataSource(sg_Reports.SELECT_ACTIVE_GUARDS_BY_STATION("", SystemConst._branch));
            report.SetParameterValue("QueryName", "SELECT_ACTIVE_GUARDS_BY_STATION");
            report.SetParameterValue("branch", SystemConst._branch);
            report.SetParameterValue("update_month", SystemConst._Report_update_month);
            cr_active_guards.ParameterFieldInfo = paramFields;


            this.cr_active_guards.ReportSource = report;
            //this.crystalReportViewer1.RefreshReport();
        }