public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            guard_employment_record_report rpt = new guard_employment_record_report();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemple #2
0
        protected void Load_Report()
        {
            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;

            guard_employment_record_report report = new guard_employment_record_report();

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

            //set report connection details
            //ConnectionInfo myconnectioninfo = new ConnectionInfo();
            //myconnectioninfo.ServerName = "Thadeous";
            //myconnectioninfo.DatabaseName = "guard_profiles_db";
            //myconnectioninfo.UserID = "sg_admin";
            //myconnectioninfo.Password = "******";
            //SET_CONNECTION_INFO(myconnectioninfo);

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

            //report.SetDataSource(sg_Reports.RETURN_OFFICER_DETAILS("", SystemConst.guard_number));
            report.SetParameterValue("QueryName", "SELECT_GUARD_EMPLOYMENT_RECORD_REPORT");
            report.SetParameterValue("guard_number", SystemConst.guard_number);
            employment_report_reportviewer.ParameterFieldInfo = paramFields;


            this.employment_report_reportviewer.ReportSource = report;
            //this.crystalReportViewer1.RefreshReport();
        }
        protected void Load_Report()
        {
            base.WindowState = FormWindowState.Maximized;
            guard_employment_record_report report         = new guard_employment_record_report();
            ParameterFields        paramFields            = new ParameterFields();
            ParameterField         parameterField         = new ParameterField();
            ParameterDiscreteValue parameterDiscreteValue = new ParameterDiscreteValue();

            foreach (Table tbCurrent in report.Database.Tables)
            {
                Set_Report_logons.SetTableLogin(tbCurrent);
            }
            report.SetParameterValue("QueryName", "SELECT_GUARD_EMPLOYMENT_RECORD_REPORT");
            report.SetParameterValue("guard_number", SystemConst.guard_number);
            this.employment_report_reportviewer.ParameterFieldInfo = paramFields;
            this.employment_report_reportviewer.ReportSource       = report;
        }