protected void loadReport(string cachedReports)
        {
            rptWeeklyCostSheet rpt = new rptWeeklyCostSheet();
            string             connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            SqlConnection      connection       = new SqlConnection(connectionString);
            SqlDataAdapter     adapter          = new SqlDataAdapter();
            DataSet            ds = new DataSet();

            string startdate    = Request.QueryString["st"].ToString();
            string enddate      = Request.QueryString["ed"].ToString();
            string dleCompanyId = Request.QueryString["comps"].ToString();;

            adapter = new SqlDataAdapter("select * from vwWeeklyCostSheet where DLEcodeCompanyID IN (SELECT * FROM dbo.DLEIdToTable(@DLEcodeCompanyID)) AND (date_ between @startdate and @enddate)", connection);
            adapter.SelectCommand.Parameters.Add("@DLEcodeCompanyID", SqlDbType.VarChar).Value = dleCompanyId;
            adapter.SelectCommand.Parameters.Add("@startdate", SqlDbType.DateTime).Value       = startdate;
            adapter.SelectCommand.Parameters.Add("@enddate", SqlDbType.DateTime).Value         = enddate;
            if (connection.State == ConnectionState.Closed)
            {
                connection.Open();
            }
            adapter.Fill(ds, "vwWeeklyCostSheet");
            rpt.SetDataSource(ds);

            adapter.Dispose();
            connection.Dispose();
            Session[cachedReports] = rpt;
            WeeklyCostSheetReport_All_ByCompany.ReportSource = rpt;
        }
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rptWeeklyCostSheet rpt = new rptWeeklyCostSheet();

            rpt.Site = this.Site;
            return(rpt);
        }