Exemple #1
0
        private void btn_print_Click(object sender, EventArgs e)
        {
            if (rdo_salwise.Checked)
            {
                frm_reportViwer rpt = new frm_reportViwer();
                rpt.MdiParent = MDI_SMartAnything.ActiveForm;
                rpt           = ReportStrings.PrintDoc("Sales Allocation".ToUpper());
                rpt_salealloc_salesman rptBank = new rpt_salealloc_salesman();

                if (rdo_fulldetails.Checked) // option 1 full view of order tracking
                {
                    rptBank.SetDataSource(ReportStrings.GetSalesAllocSalOnly(txt_salesman.Text.Trim(), "", 1));
                }

                rpt.RepViewer.ReportSource = rptBank;
                rpt.RepViewer.Refresh();
                rpt.Show();
            }
            else if (rdo_salcuswise.Checked)
            {
                frm_reportViwer rpt = new frm_reportViwer();
                rpt.MdiParent = MDI_SMartAnything.ActiveForm;
                rpt           = ReportStrings.PrintDoc("Sales Allocation".ToUpper());
                rpt_salealloc_sale_customer rptBank = new rpt_salealloc_sale_customer();

                if (rdo_fulldetails.Checked) // option 1 full view of order tracking
                {
                    rptBank.SetDataSource(ReportStrings.GetSalesAlloc(txt_salesman.Text.Trim(), "", 1));
                }

                rpt.RepViewer.ReportSource = rptBank;
                rpt.RepViewer.Refresh();
                rpt.Show();
            }
        }