Ejemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rptAdviceSlip rpt = new rptAdviceSlip();

            rpt.Site = this.Site;
            return(rpt);
        }
Ejemplo n.º 2
0
        protected void loadReport(string cachedReports)
        {
            int            rptCacheTimeout  = Convert.ToInt32(ConfigurationManager.AppSettings.Get("rptCacheTimeout").ToString());
            rptAdviceSlip  rpt              = new rptAdviceSlip();
            string         connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            SqlConnection  connection       = new SqlConnection(connectionString);
            SqlDataAdapter adapter          = new SqlDataAdapter();
            DataSet        ds      = new DataSet();
            string         batchno = Request.QueryString["rptBatchNo"].ToString();

            adapter = new SqlDataAdapter("select * from Vw_AdviceSlip_Outcome where (ClaimsBatchNo = @ClaimsBatchNo)", connection);
            adapter.SelectCommand.Parameters.Add("@ClaimsBatchNo", SqlDbType.Int).Value = batchno;
            if (connection.State == ConnectionState.Closed)
            {
                connection.Open();
            }
            adapter.Fill(ds, "Vw_AdviceSlip_Outcome");
            rpt.SetDataSource(ds);

            adapter.Dispose();
            connection.Dispose();
            Cache.Insert(cachedReports, rpt, null, DateTime.MaxValue, TimeSpan.FromMinutes(rptCacheTimeout));
            AdviceSlipReport.ReportSource = rpt;
        }