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

            rpt.Site = this.Site;
            return(rpt);
        }
Ejemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            rptDailyDepStatus      oRpt = new rptDailyDepStatus();
            ParameterFields        ps   = new ParameterFields();
            ParameterField         p    = new ParameterField();
            ParameterDiscreteValue pdc  = new ParameterDiscreteValue();

            SetDBLogonForReport(oRpt);
            p.Name    = "@dt";
            pdc.Value = Convert.ToDateTime(dateTimePicker1.Value.ToShortDateString());
            p.CurrentValues.Add(pdc);
            ps.Add(p);
            ParameterField         p3   = new ParameterField();
            ParameterDiscreteValue pdc3 = new ParameterDiscreteValue();

            p3.Name    = "@compCode";
            pdc3.Value = cmbCompany.SelectedValue.ToString();
            p3.CurrentValues.Add(pdc3);
            ps.Add(p3);
            crystalReportViewer1.ParameterFieldInfo = ps;
            crystalReportViewer1.ReportSource       = oRpt;
            crystalReportViewer1.Show();
        }