Esempio n. 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rptWorkerList rpt = new rptWorkerList();

            rpt.Site = this.Site;
            return(rpt);
        }
Esempio n. 2
0
        protected void loadReport(string cachedReports)
        {
            rptWorkerList  rpt = new rptWorkerList();
            string         connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            SqlConnection  connection       = new SqlConnection(connectionString);
            SqlDataAdapter adapter          = new SqlDataAdapter();
            DataSet        ds = new DataSet();

            adapter = new SqlDataAdapter("select * from vwWorkerList where WorkerType = 'W'", connection);
            if (connection.State == ConnectionState.Closed)
            {
                connection.Open();
            }
            adapter.Fill(ds, "vwWorkerList");
            rpt.SetDataSource(ds);

            adapter.Dispose();
            connection.Dispose();

            Session[cachedReports]        = rpt;
            WorkerListReport.ReportSource = rpt;
        }