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

            rpt.Site = this.Site;
            return(rpt);
        }
        protected void loadReport(string cachedReports)
        {
            //int rptCacheTimeout = Convert.ToInt32(ConfigurationManager.AppSettings.Get("rptCacheTimeout").ToString());
            rptDailyReportListing_Disapproved rpt = new rptDailyReportListing_Disapproved();
            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();

            ParameterValues        parameters = new ParameterValues();
            ParameterDiscreteValue sdate      = new ParameterDiscreteValue();
            ParameterDiscreteValue edate      = new ParameterDiscreteValue();

            sdate.Value = startdate;
            edate.Value = enddate;

            adapter = new SqlDataAdapter("select * from vwDailyReportListing_Disapproved where (Adate between '" + startdate + "' and '" + enddate + "')", connection);
            if (connection.State == ConnectionState.Closed)
            {
                connection.Open();
            }
            adapter.Fill(ds, "vwDailyReportListing_Disapproved");
            rpt.SetDataSource(ds);

            parameters.Add(sdate);
            rpt.DataDefinition.ParameterFields["Startdate"].ApplyCurrentValues(parameters);
            parameters.Add(edate);
            rpt.DataDefinition.ParameterFields["Enddate"].ApplyCurrentValues(parameters);

            adapter.Dispose();
            connection.Dispose();
            //Cache.Insert(cachedReports, rpt, null, DateTime.MaxValue, TimeSpan.FromMinutes(rptCacheTimeout));
            Session[cachedReports] = rpt;
            DailyReportListingDisapprovedReport.ReportSource = rpt;
        }