public void PrintGroupReport()
        {
            Data.TerminalReport clsTerminalReport = new Data.TerminalReport(mConnection, mTransaction);
            mConnection = clsTerminalReport.Connection; mTransaction = clsTerminalReport.Transaction;

            Data.TerminalReportDetails clsTerminalReportDetails = clsTerminalReport.Details(mclsTerminalDetails.BranchDetails.BranchID, mclsTerminalDetails.TerminalNo);
            System.Data.DataTable dtGroupReport = clsTerminalReport.GroupReport(mclsTerminalDetails.BranchDetails.BranchID, mclsTerminalDetails.TerminalNo);
            clsTerminalReport.CommitAndDispose();

            DialogResult result = DialogResult.OK;

            if (mclsTerminalDetails.PreviewTerminalReport)
            {
                GroupReportWnd clsGroupReportWnd = new GroupReportWnd();
                clsGroupReportWnd.TerminalDetails = mclsTerminalDetails;
                clsGroupReportWnd.CashierName = mCashierName;
                clsGroupReportWnd.dtGroupReport = dtGroupReport;
                clsGroupReportWnd.TerminalReportDetails = clsTerminalReportDetails;
                clsGroupReportWnd.ShowDialog(this);
                result = clsGroupReportWnd.Result;
                clsGroupReportWnd.Close();
                clsGroupReportWnd.Dispose();
            }

            if (result == DialogResult.OK)
            {
                //PrintGroupReportDelegate groupreportDel = new PrintGroupReportDelegate(PrintGroupReport);
                PrintGroupReport(dtGroupReport, clsTerminalReportDetails);
            }
        }