예제 #1
0
 private void FillGrid()
 {
     try
     {
         objdt         = new DataTable();
         report        = new ClsReport();
         report.Action = "Grid";
         objdt         = report.GetReport();
         if (objdt.Rows.Count > 0)
         {
             GVAnnualReport.DataSource = objdt;
             GVAnnualReport.DataBind();
         }
         else
         {
             GVAnnualReport.DataSource = null;
             GVAnnualReport.DataBind();
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #2
0
        protected void Page_Init(object sender, EventArgs e)
        {
            try
            {
                if (current.SessionReport == null)
                {
                    return;
                }
                this.Focus();
                ClsReport rep = new ClsReport();
                DataTable dt  = new DataTable();

                rep = current.SessionReport;


                rpt1.Load(Server.MapPath(rep.FileName));

                CrystalReportViewer1.ParameterFieldInfo = rep.ParametersFields;
                dt = (DataTable)rep.Dt;
                if (dt != null)
                {
                    rpt1.SetDataSource(dt);
                }

                ConnectionInfo ConnInfo    = new ConnectionInfo();
                string         SCBLconnStr = _connectionString;

                string[] ff;
                string[] ss;

                ff = SCBLconnStr.Split('=');

                ss = ff[1].Split(';');
                ConnInfo.ServerName = ss[0];

                ss = ff[2].Split(';');
                ConnInfo.DatabaseName = ss[0];
                if (rep.Databasename != null)
                {
                    ConnInfo.DatabaseName = rep.Databasename;
                }

                ss = ff[3].Split(';');
                ConnInfo.UserID = ss[0];

                ss = ff[4].Split(';');
                ConnInfo.Password = ss[0];


                // Tables RepTbls = rpt1.Database.Tables;

                foreach (CrystalDecisions.CrystalReports.Engine.Table RepTbl in rpt1.Database.Tables)
                {
                    TableLogOnInfo RepTblLogonInfo = RepTbl.LogOnInfo;
                    RepTblLogonInfo.ConnectionInfo = ConnInfo;
                    RepTbl.ApplyLogOnInfo(RepTblLogonInfo);
                }

                CrystalReportViewer1.ReportSource = rpt1;

                if (rep.SelectionFormulla != null)
                {
                    if (rep.SelectionFormulla != "")
                    {
                        CrystalReportViewer1.SelectionFormula = rep.SelectionFormulla;
                    }
                }
                if (rep.Pagezoomfactor != null)
                {
                    CrystalReportViewer1.PageZoomFactor = rep.Pagezoomfactor;
                }
                CrystalReportViewer1.DataBind();
            }
            catch
            { }
        }
예제 #3
0
        public string dtReportNow()
        {
            ClsReport cls = new ClsReport();

            return(ClsDES.Encrypt(cls.dtReportNow()));
        }
예제 #4
0
        public string dtReportCheck(DateTime dDate1, DateTime dDate2, DateTime dDate3, DateTime dDate4, string cPCCode, string cDCCode, string PersonCode, string cECode)
        {
            ClsReport cls = new ClsReport();

            return(ClsDES.Encrypt(cls.dtReportCheck(dDate1, dDate2, dDate3, dDate4, ClsDES.Decrypt(cPCCode), ClsDES.Decrypt(cDCCode), ClsDES.Decrypt(PersonCode), ClsDES.Decrypt(cECode))));
        }