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();
            }
        }
Exemple #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            frm_reportViwer rpt = new frm_reportViwer();

            rpt.MdiParent = MDI_SMartAnything.ActiveForm;
            rpt           = ReportStrings.PrintDoc("Order Tracking Summary");
            rpt_pendingapprovals rptBank = new rpt_pendingapprovals();

            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetPendingApprovaltSTR("")));
            rpt.RepViewer.ReportSource = rptBank;
            rpt.RepViewer.Refresh();
            rpt.Show();
        }
        private void btn_print_Click(object sender, EventArgs e)
        {
            try
            {
                frm_reportViwer rpt = new frm_reportViwer();
                rpt.MdiParent = MDI_SMartAnything.ActiveForm;
                rpt           = ReportStrings.PrintDoc("Sales Sammary");
                rpt_salessmmary_new rptBank = new rpt_salessmmary_new();

                if (rdo_fulldetails.Checked) // option 1 full view of order tracking
                {
                    rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetSalesSammaryNew("", false, "", dtfrom.Value, dtto.Value, 1, 1)));
                }
                rpt.RepViewer.ReportSource = rptBank;
                rpt.RepViewer.Refresh();
                rpt.Show();
            }
            catch (Exception ex) { }
        }
Exemple #4
0
        private void btn_print_Click(object sender, EventArgs e)
        {
            try
            {
                frm_reportViwer rpt = new frm_reportViwer();
                rpt.MdiParent = MDI_SMartAnything.ActiveForm;
                rpt           = ReportStrings.PrintDoc("CUSTOMER LIABILITY");
                rpt_cusliability rptBank = new rpt_cusliability();


                if (rdo_fulldetails.Checked) // option 1 full view of order tracking
                {
                    rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetCusLiabilityDet("", false, "", dtfrom.Value, dtto.Value, 1, 1)));
                }
                if (rdo_CusRange.Checked) // option 1 full view of order tracking
                {
                    if (txt_customer1.Text.Trim() == "")
                    {
                        commonFunctions.SetMDIStatusMessage("Please enter customer first", 1);
                        errorProvider1.SetError(txt_customer1, "Please enter customer first");
                        return;
                    }
                    if (txt_customer2.Text.Trim() == "")
                    {
                        commonFunctions.SetMDIStatusMessage("Please enter customer first", 1);
                        errorProvider1.SetError(txt_customer2, "Please enter customer first");
                        return;
                    }

                    rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetCusLiabilityDet(txt_customer1.Text, false, txt_customer2.Text, dtfrom.Value, dtto.Value, 1, 2)));
                }

                if (rdo_cat.Checked) // option 1 full view of order tracking
                {
                    string subcat = "";
                    int    header = 3;
                    if (txt_Category.Text.Trim() == "")
                    {
                        commonFunctions.SetMDIStatusMessage("Please enter customer category first", 1);
                        errorProvider1.SetError(txt_Category, "Please enter customer category first");
                        return;
                    }

                    if (rdo_subcat.Checked)
                    {
                        if (txt_subcat.Text.Trim() == "")
                        {
                            commonFunctions.SetMDIStatusMessage("Please enter customer subcategory first", 1);
                            errorProvider1.SetError(txt_subcat, "Please enter customer subcategory first");
                            return;
                        }
                        subcat = txt_subcat.Text.Trim();
                        header = 4;
                    }

                    rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetCusLiabilityDet(txt_customer1.Text, false, txt_customer2.Text, dtfrom.Value, dtto.Value, 1, header)));
                }
                if (rdo_salesman.Checked) // option 1 full view of order tracking
                {
                    if (txt_salesman.Text.Trim() == "")
                    {
                        commonFunctions.SetMDIStatusMessage("Please enter salesman first", 1);
                        errorProvider1.SetError(txt_Category, "Please enter salesman first");
                        return;
                    }

                    rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetCusLiabilityDet(txt_customer1.Text, false, txt_customer2.Text, dtfrom.Value, dtto.Value, 1, 5)));
                }


                rpt.RepViewer.ReportSource = rptBank;
                rpt.RepViewer.Refresh();
                rpt.Show();
            }
            catch (Exception ex) { }
        }
Exemple #5
0
        private void btn_print_Click(object sender, EventArgs e)
        {
            try
            {
                frm_reportViwer rpt = new frm_reportViwer();
                rpt.MdiParent = MDI_SMartAnything.ActiveForm;
                rpt           = ReportStrings.PrintDoc("Order Tracking");
                rpt_OrderTrackingSummary rptBank = new rpt_OrderTrackingSummary();

                if (rdo_summary.Checked)         //if summary cracked
                {
                    if (rdo_fulldetails.Checked) // option 1 full view of order tracking
                    {
                        if (rdo_pinv.Checked)    //if pending invoice cracked
                        {
                            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetOrderTrackSummary("", false, "", dtfrom.Value, dtto.Value, 1, 1)));
                        }
                        else if (rdo_pdo.Checked) //
                        {
                            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetOrderTrackSummary("", false, "", dtfrom.Value, dtto.Value, 1, 2)));
                        }
                        else if (rdo_paudit.Checked) //
                        {
                            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetOrderTrackSummary("", false, "", dtfrom.Value, dtto.Value, 1, 3)));
                        }
                        else if (rdo_pdispatch.Checked) //
                        {
                            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetOrderTrackSummary("", false, "", dtfrom.Value, dtto.Value, 1, 4)));
                        }
                        else if (rdo_dilivery.Checked) //
                        {
                            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetOrderTrackSummary("", false, "", dtfrom.Value, dtto.Value, 1, 5)));
                        }
                        else if (rdo_pconfirm.Checked) //
                        {
                            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetOrderTrackSummary("", false, "", dtfrom.Value, dtto.Value, 1, 6)));
                        }
                    }
                    if (rdo_supp.Checked) // option 1 full view of order tracking
                    {
                        if (txt_Suplier.Text.Trim() == "")
                        {
                            commonFunctions.SetMDIStatusMessage("Please enter customer first", 1);
                            errorProvider1.SetError(txt_Suplier, "Please enter customer first");
                            return;
                        }

                        if (rdo_pinv.Checked) //if pending invoice cracked
                        {
                            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetOrderTrackSummary(txt_Suplier.Text.Trim(), false, "", dtfrom.Value, dtto.Value, 2, 1)));
                        }
                        else if (rdo_pdo.Checked) //
                        {
                            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetOrderTrackSummary(txt_Suplier.Text.Trim(), false, "", dtfrom.Value, dtto.Value, 2, 2)));
                        }
                        else if (rdo_paudit.Checked) //
                        {
                            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetOrderTrackSummary(txt_Suplier.Text.Trim(), false, "", dtfrom.Value, dtto.Value, 2, 3)));
                        }
                        else if (rdo_pdispatch.Checked) //
                        {
                            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetOrderTrackSummary(txt_Suplier.Text.Trim(), false, "", dtfrom.Value, dtto.Value, 2, 4)));
                        }
                        else if (rdo_dilivery.Checked) //
                        {
                            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetOrderTrackSummary(txt_Suplier.Text.Trim(), false, "", dtfrom.Value, dtto.Value, 2, 5)));
                        }
                        else if (rdo_pconfirm.Checked) //
                        {
                            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetOrderTrackSummary(txt_Suplier.Text.Trim(), false, "", dtfrom.Value, dtto.Value, 2, 6)));
                        }
                    }

                    if (rdo_cat.Checked) // option 1 full view of order tracking
                    {
                        string subcat = "";
                        int    header = 3;
                        if (txt_Category.Text.Trim() == "")
                        {
                            commonFunctions.SetMDIStatusMessage("Please enter customer category first", 1);
                            errorProvider1.SetError(txt_Category, "Please enter customer category first");
                            return;
                        }

                        if (rdo_subcat.Checked)
                        {
                            if (txt_subcat.Text.Trim() == "")
                            {
                                commonFunctions.SetMDIStatusMessage("Please enter customer subcategory first", 1);
                                errorProvider1.SetError(txt_subcat, "Please enter customer subcategory first");
                                return;
                            }
                            subcat = txt_subcat.Text.Trim();
                            header = 4;
                        }

                        if (rdo_pinv.Checked) //if pending invoice cracked
                        {
                            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetOrderTrackSummary(txt_Category.Text.Trim(), false, subcat, dtfrom.Value, dtto.Value, header, 1)));
                        }
                        else if (rdo_pdo.Checked) //
                        {
                            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetOrderTrackSummary(txt_Category.Text.Trim(), false, "", dtfrom.Value, dtto.Value, header, 2)));
                        }
                        else if (rdo_paudit.Checked) //
                        {
                            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetOrderTrackSummary(txt_Category.Text.Trim(), false, "", dtfrom.Value, dtto.Value, header, 3)));
                        }
                        else if (rdo_pdispatch.Checked) //
                        {
                            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetOrderTrackSummary(txt_Category.Text.Trim(), false, "", dtfrom.Value, dtto.Value, header, 4)));
                        }
                        else if (rdo_dilivery.Checked) //
                        {
                            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetOrderTrackSummary(txt_Category.Text.Trim(), false, "", dtfrom.Value, dtto.Value, header, 5)));
                        }
                        else if (rdo_pconfirm.Checked) //
                        {
                            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetOrderTrackSummary(txt_Category.Text.Trim(), false, "", dtfrom.Value, dtto.Value, header, 6)));
                        }
                    }
                }
                rpt.RepViewer.ReportSource = rptBank;
                rpt.RepViewer.Refresh();
                rpt.Show();

                if (rdo_foroneorder.Checked)
                {
                    frm_reportViwer rpt1 = new frm_reportViwer();
                    rpt1.MdiParent = MDI_SMartAnything.ActiveForm;
                    rpt1           = ReportStrings.PrintDoc("Order Tracking Summary");
                    rpt_ordertracking rptBank1 = new rpt_ordertracking();
                    rptBank1.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetOrderTrackOne(textBox2.Text.Trim())));
                    rpt1.RepViewer.ReportSource = rptBank1;
                    rpt1.RepViewer.Refresh();
                    rpt1.Show();
                }
            }
            catch (Exception ex) { }
        }
        private void btn_print_Click(object sender, EventArgs e)
        {
            try
            {
                frm_reportViwer rpt = new frm_reportViwer();
                rpt.MdiParent = MDI_SMartAnything.ActiveForm;

                if (rdo_fulldet.Checked)
                {
                    if (rdo_orderform.Checked)
                    {
                        rpt = ReportStrings.PrintDoc("PENDING Order Forms");
                        rpt_pendingOF rptBank = new rpt_pendingOF();
                        rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetPendingApprovalOF(txt_Suplier.Text.Trim(), "", dtfrom.Value, dtto.Value, 4)));
                        rpt.RepViewer.ReportSource = rptBank;
                    }
                    if (rdo_invoice.Checked)
                    {
                        rpt = ReportStrings.PrintDoc("PENDING Invoices");
                        rpt_pendingInvoice rptBank = new rpt_pendingInvoice();
                        rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetPendingApprovalInvoices(txt_Suplier.Text.Trim(), "", dtfrom.Value, dtto.Value, 4)));
                        rpt.RepViewer.ReportSource = rptBank;
                    }
                    if (rdo_DO.Checked)
                    {
                        rpt = ReportStrings.PrintDoc("PENDING Dilivery Orders");
                        rpt_penddingDos rptBank = new rpt_penddingDos();
                        rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetPendingApprovaldos(txt_Suplier.Text.Trim(), "", dtfrom.Value, dtto.Value, 4)));
                        rpt.RepViewer.ReportSource = rptBank;
                    }
                }


                if (rdo_supp.Checked)
                {
                    if (txt_Suplier.Text.Trim() == "")
                    {
                        commonFunctions.SetMDIStatusMessage("Please enter supplier first", 1);
                        errorProvider1.SetError(txt_Category, "Please enter supplier first");
                        return;
                    }
                    if (rdo_orderform.Checked)
                    {
                        rpt = ReportStrings.PrintDoc("PENDING Order Forms");
                        rpt_pendingOF rptBank = new rpt_pendingOF();
                        rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetPendingApprovalOF(txt_Suplier.Text.Trim(), "", dtfrom.Value, dtto.Value, 1)));
                        rpt.RepViewer.ReportSource = rptBank;
                    }
                    if (rdo_invoice.Checked)
                    {
                        rpt = ReportStrings.PrintDoc("PENDING Invoices");
                        rpt_pendingInvoice rptBank = new rpt_pendingInvoice();
                        rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetPendingApprovalInvoices(txt_Suplier.Text.Trim(), "", dtfrom.Value, dtto.Value, 1)));
                        rpt.RepViewer.ReportSource = rptBank;
                    }
                    if (rdo_DO.Checked)
                    {
                        rpt = ReportStrings.PrintDoc("PENDING Dilivery Orders");
                        rpt_penddingDos rptBank = new rpt_penddingDos();
                        rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetPendingApprovaldos(txt_Suplier.Text.Trim(), "", dtfrom.Value, dtto.Value, 1)));
                        rpt.RepViewer.ReportSource = rptBank;
                    }
                }

                if (rdo_cat.Checked)
                {
                    if (txt_Category.Text.Trim() == "")
                    {
                        commonFunctions.SetMDIStatusMessage("Please enter customer category first", 1);
                        errorProvider1.SetError(txt_Category, "Please enter customer category first");
                        return;
                    }

                    if (!rdo_subcat.Checked) //with subcategory
                    {
                        if (rdo_orderform.Checked)
                        {
                            rpt = ReportStrings.PrintDoc("PENDING Order Forms");
                            rpt_pendingOF rptBank = new rpt_pendingOF();
                            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetPendingApprovalOF(txt_Category.Text.Trim(), "", dtfrom.Value, dtto.Value, 2)));
                            rpt.RepViewer.ReportSource = rptBank;
                        }
                        if (rdo_invoice.Checked)
                        {
                            rpt = ReportStrings.PrintDoc("PENDING Invoices");
                            rpt_pendingInvoice rptBank = new rpt_pendingInvoice();
                            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetPendingApprovalInvoices(txt_Category.Text.Trim(), "", dtfrom.Value, dtto.Value, 2)));
                            rpt.RepViewer.ReportSource = rptBank;
                        }
                        if (rdo_DO.Checked)
                        {
                            rpt = ReportStrings.PrintDoc("PENDING Dilivery Orders");
                            rpt_penddingDos rptBank = new rpt_penddingDos();
                            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetPendingApprovaldos(txt_Category.Text.Trim(), "", dtfrom.Value, dtto.Value, 2)));
                            rpt.RepViewer.ReportSource = rptBank;
                        }
                    }
                    else
                    { //with no subcategory
                        if (txt_subcat.Text.Trim() == "")
                        {
                            commonFunctions.SetMDIStatusMessage("Please enter customer subcategory first", 1);
                            errorProvider1.SetError(txt_subcat, "Please enter customer subcategory first");
                            return;
                        }
                        if (rdo_orderform.Checked)
                        {
                            rpt = ReportStrings.PrintDoc("PENDING Order Forms");
                            rpt_pendingOF rptBank = new rpt_pendingOF();
                            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetPendingApprovalOF(txt_Category.Text.Trim(), txt_subcat.Text.Trim(), dtfrom.Value, dtto.Value, 3)));
                            rpt.RepViewer.ReportSource = rptBank;
                        }
                        if (rdo_invoice.Checked)
                        {
                            rpt = ReportStrings.PrintDoc("PENDING Invoices");
                            rpt_pendingInvoice rptBank = new rpt_pendingInvoice();
                            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetPendingApprovalInvoices(txt_Category.Text.Trim(), txt_subcat.Text.Trim(), dtfrom.Value, dtto.Value, 3)));
                            rpt.RepViewer.ReportSource = rptBank;
                        }
                        if (rdo_DO.Checked)
                        {
                            rpt = ReportStrings.PrintDoc("PENDING Dilivery Orders");
                            rpt_penddingDos rptBank = new rpt_penddingDos();
                            rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetPendingApprovaldos(txt_Category.Text.Trim(), txt_subcat.Text.Trim(), dtfrom.Value, dtto.Value, 2)));
                            rpt.RepViewer.ReportSource = rptBank;
                        }
                    }
                }



                rpt.RepViewer.Refresh();
                rpt.Show();
            }
            catch (Exception ex) {
            }
        }
        private void btn_print_Click(object sender, EventArgs e)
        {
            try
            {
                frm_reportViwer rpt = new frm_reportViwer();
                rpt.MdiParent = MDI_SMartAnything.ActiveForm;
                rpt           = ReportStrings.PrintDoc("cheque details".ToUpper());
                rpt_allCQs rptBank = new rpt_allCQs();

                if (rdo_fulldetails.Checked) // option 1 full view of order tracking
                {
                    if (rdo_pd.Checked)
                    {
                        rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetCQDetails(txt_Suplier.Text.Trim(), false, "", dtfrom.Value, dtto.Value, 1, 1)));
                    }
                    else if (rdo_returned.Checked)
                    {
                        rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetCQDetails(txt_Suplier.Text.Trim(), false, "", dtfrom.Value, dtto.Value, 1, 2)));
                    }
                    else if (rdo_relize.Checked)
                    {
                        rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetCQDetails(txt_Suplier.Text.Trim(), false, "", dtfrom.Value, dtto.Value, 1, 3)));
                    }
                    else if (rdo_unrealize.Checked)
                    {
                        rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetCQDetails(txt_Suplier.Text.Trim(), false, "", dtfrom.Value, dtto.Value, 1, 4)));
                    }
                }
                if (rdo_supp.Checked) // option 1 full view of order tracking
                {
                    if (txt_Suplier.Text.Trim() == "")
                    {
                        commonFunctions.SetMDIStatusMessage("Please enter customer first", 1);
                        errorProvider1.SetError(txt_Suplier, "Please enter customer first");
                        return;
                    }
                    if (rdo_pd.Checked)
                    {
                        rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetCQDetails(txt_Suplier.Text.Trim(), false, "", dtfrom.Value, dtto.Value, 2, 1)));
                    }
                    else if (rdo_returned.Checked)
                    {
                        rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetCQDetails(txt_Suplier.Text.Trim(), false, "", dtfrom.Value, dtto.Value, 2, 2)));
                    }
                    else if (rdo_relize.Checked)
                    {
                        rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetCQDetails(txt_Suplier.Text.Trim(), false, "", dtfrom.Value, dtto.Value, 2, 3)));
                    }
                    else if (rdo_unrealize.Checked)
                    {
                        rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetCQDetails(txt_Suplier.Text.Trim(), false, "", dtfrom.Value, dtto.Value, 2, 4)));
                    }
                }

                if (rdo_cat.Checked) // option 1 full view of order tracking
                {
                    string subcat = "";
                    int    header = 3;
                    if (txt_Category.Text.Trim() == "")
                    {
                        commonFunctions.SetMDIStatusMessage("Please enter customer category first", 1);
                        errorProvider1.SetError(txt_Category, "Please enter customer category first");
                        return;
                    }

                    if (rdo_subcat.Checked)
                    {
                        if (txt_subcat.Text.Trim() == "")
                        {
                            commonFunctions.SetMDIStatusMessage("Please enter customer subcategory first", 1);
                            errorProvider1.SetError(txt_subcat, "Please enter customer subcategory first");
                            return;
                        }
                        subcat = txt_subcat.Text.Trim();
                        header = 4;
                    }
                    if (rdo_pd.Checked)
                    {
                        rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetCQDetails(txt_Category.Text.Trim(), false, subcat, dtfrom.Value, dtto.Value, header, 1)));
                    }
                    else if (rdo_returned.Checked)
                    {
                        rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetCQDetails(txt_Category.Text.Trim(), false, subcat, dtfrom.Value, dtto.Value, header, 2)));
                    }
                    else if (rdo_relize.Checked)
                    {
                        rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetCQDetails(txt_Category.Text.Trim(), false, subcat, dtfrom.Value, dtto.Value, header, 3)));
                    }
                    else if (rdo_unrealize.Checked)
                    {
                        rptBank.SetDataSource(commonFunctions.GetDatatable(ReportStrings.GetCQDetails(txt_Category.Text.Trim(), false, subcat, dtfrom.Value, dtto.Value, header, 4)));
                    }
                }


                rpt.RepViewer.ReportSource = rptBank;
                rpt.RepViewer.Refresh();
                rpt.Show();
            }
            catch (Exception ex) { }
        }