private void PulloutReports()
        {
            //string rptDocCachedKey = null;
            ReportDocument rpt =  new PulloutRequest();

            SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["IRMSConnectionString"].ConnectionString);
            conn.Open();

            SqlCommand cmd = new SqlCommand();
            cmd.Connection = conn;
            cmd.CommandTimeout = 3000;

            DataTable ResultSet = new DataTable();
            cmd.CommandText = "select agno from custinfo a inner join PULLOUT_HDR b on a.custno = b.customer_no where a.ynheadoffice=0 and b.id = '" + Session["ID"] + "'";

            using (SqlDataAdapter adapter = new SqlDataAdapter())
            {
                adapter.SelectCommand = cmd;
                adapter.Fill(ResultSet);
            }
            foreach(DataRow row in ResultSet.Rows)
            {
            //rptDocCachedKey = "PULLOUT";
                //int AGNO = ;
                if ((int)row[0] != 1)
                {
                    //if (rptDocCachedKey != null)
                    //{
                    //    rpt = (PulloutRequest)Cache[rptDocCachedKey];
                    //}
                    //else
                    //{
                    rpt = new PulloutRequestProv();
                    //    Cache.Insert(rptDocCachedKey, rpt);
                    //}
                }
                else
                {
                    //if (rptDocCachedKey != null)
                    //{
                    //    rpt = (PulloutRequestProv)Cache[rptDocCachedKey];
                    //}
                    //else
                    //{
                        rpt = new PulloutRequest();
                    //    Cache.Insert(rptDocCachedKey, rpt);
                    //}
                }
            }
            conn.Close();

            DataBaseLogIn(rpt);

            ParameterField prmID = new ParameterField();
            ParameterFields prmList = new ParameterFields();

            prmID.ParameterFieldName = "ID";

            ParameterDiscreteValue prmIDValue = new ParameterDiscreteValue();

            prmIDValue.Value = Session["ID"];

            prmID.CurrentValues.Add(prmIDValue);

            prmList.Add(prmID);

            crvPulloutReport.ParameterFieldInfo = prmList;
            crvPulloutReport.ReportSource = rpt;
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     PulloutRequestProv rpt = new PulloutRequestProv();
     rpt.Site = this.Site;
     return rpt;
 }