Пример #1
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            if (txtPkid.Text == "")
            {
                glb_function.MsgBox("الرجاء اختيار القيد");
                return;
            }

            cryRepCashPayments report   = new cryRepCashPayments();
            frmReportContainer frm      = new frmReportContainer();
            DataTable          dtReport = new DataTable();

            ConnectionToMySQL cnn = new ConnectionToMySQL();

            dtReport = cnn.GetDataTable("select h.pkid,h.jour_no,h.trans_name,date_format(h.jour_date,'%d/%m/%Y') jour_date,h.jour_note,h.Person, a.Acc_no,a.acc_name, " +
                                        " if (d.main_value > 0,d.main_value,0) Dept,if (d.main_value < 0,d.main_value * -1,0) Credit,d.jour_details,trans_no " +
                                        " from journal_header h " +
                                        "  join journal_details d on(h.pkid= d.header_id) " +
                                        "  join accounts a on(a.pkid= d.acc_id)  " +
                                        " where d.main_value>0 and  h.pkid=  " + txtPkid.Text);


            string strTotal = N2C.ConvertN2C.ConvertNow(Convert.ToDouble(txtDeptTotal.Text.Trim()), "ريال", "فلس");

            report.SetDataSource(dtReport);
            report.SetParameterValue("strCasher", "الصندوق الرئيسي");
            report.SetParameterValue("strValueAlpha", strTotal);
            report.SetParameterValue("strValue", txtDeptTotal.Text);
            frm.CrystalReportsViewer1.ReportSource = report;
            frm.ShowDialog();
        }
Пример #2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            cryRepCashPayments rpt = new cryRepCashPayments();

            rpt.Site = this.Site;
            return(rpt);
        }