Esempio n. 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rptBankLedger rpt = new rptBankLedger();

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

            SetDBLogonForReport(oRpt);
            p.Name    = "@fmdate";
            pdc.Value = Convert.ToDateTime(dtpFrom.Value.ToShortDateString());
            p.CurrentValues.Add(pdc);
            ps.Add(p);
            ParameterField         p2   = new ParameterField();
            ParameterDiscreteValue pdc2 = new ParameterDiscreteValue();

            p2.Name    = "@todate";
            pdc2.Value = Convert.ToDateTime(dtpTo.Value.ToShortDateString());
            p2.CurrentValues.Add(pdc2);
            ps.Add(p2);
            ParameterField         p3   = new ParameterField();
            ParameterDiscreteValue pdc3 = new ParameterDiscreteValue();

            p3.Name    = "@accounts";
            pdc3.Value = Convert.ToInt32(cmbAccount.SelectedValue);
            p3.CurrentValues.Add(pdc3);
            ps.Add(p3);
            crystalReportViewer1.ParameterFieldInfo = ps;
            crystalReportViewer1.ReportSource       = oRpt;
            crystalReportViewer1.Show();
        }