Beispiel #1
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            if (txtPkid.Text == "")
            {
                glb_function.MsgBox("الرجاء اختيار الفاتورة");
                return;
            }


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


            ConnectionToMySQL cnn = new ConnectionToMySQL();

            dtReport = cnn.GetDataTable("select h.pkid, h.stat,date_format(h.created_date,'%d/%m/%Y') created_date, h.created_user, h.invoice_no, h.warehouse_id, " +
                                        " h.pump_emp, h.pump_id, h.emp_id, h.old_counter, h.new_counter, " +
                                        " h.invoice_note, h.item_id, h.qty, h.unitsellingPrice, h.TotalSellingPrice, " +
                                        " i.itemno, i.itemname, " +
                                        " w.warehouse_name, " +
                                        " emp.empname " +
                                        "  from invoice_header h " +
                                        " join items i on (i.pkid = h.item_id) " +
                                        " join warehouse w on (w.pkid = h.warehouse_id) " +
                                        " join emp on (emp.pkid = h.emp_id) " +
                                        " where h.pkid = " + txtPkid.Text);


            report.SetDataSource(dtReport);
            frm.CrystalReportsViewer1.ReportSource = report;

            frm.ShowDialog();
        }
Beispiel #2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            cryRepSalesInvoice rpt = new cryRepSalesInvoice();

            rpt.Site = this.Site;
            return(rpt);
        }
Beispiel #3
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            if (txtPkid.Text == "")
            {
                glb_function.MsgBox("الرجاء اختيار الفاتورة");
                return;
            }


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


            ConnectionToMySQL cnn = new ConnectionToMySQL();

            dtReport = cnn.GetDataTable("SELECT h.pkid pkheader,h.invoice_no,h.invoice_note,h.invoice_value,date_format(h.invoice_date,'%d/%m/%Y') invoice_date , " +
                                        " d.warehouse_id, d.pump_emp, d.pump_id, p.PumpNo, p.PumpName, d.emp_id, e.empname, d.old_counter, d.new_counter, " +
                                        " d.item_id, i.itemname, d.qty, d.unitsellingPrice, d.TotalSellingPrice " +
                                        "  FROM invoice_header h " +
                                        " join invoice_details d on(h.pkid = d.header_id) " +
                                        "  join pumps p on(p.pkid = d.pump_id) " +
                                        " join emp e on(e.pkid = d.emp_id) " +
                                        "  join items i on(i.pkid = d.item_id) " +
                                        " where h.pkid = " + txtPkid.Text);


            report.SetDataSource(dtReport);
            frm.CrystalReportsViewer1.ReportSource = report;

            frm.ShowDialog();
        }