internal void ShowAccountingWinLossReport(string p, DataSet dtDataset, int ZoneNo, int MachineCategoryNo, DateTime StartDate, DateTime EndDate, string ZoneName, string CategoryName, bool IncludeNonCashable)
        {

            try
            {
                CrystalDecisions.CrystalReports.Engine.Database crDatabase;
                CrystalDecisions.CrystalReports.Engine.Tables crTables;

                TableLogOnInfo tableLogonInfo = new TableLogOnInfo();
                ConnectionInfo connectionInfo = new ConnectionInfo();
                DbConnectionDetails.DatabaseName = "EXCHANGE";

                connectionInfo.ServerName = DbConnectionDetails.ServerName;
                connectionInfo.UserID = DbConnectionDetails.UserName;
                connectionInfo.Password = DbConnectionDetails.Password;
                connectionInfo.DatabaseName = DbConnectionDetails.DatabaseName;

                string sVersion, sSiteName;

                var vAccountingWinLossReport = new AccountingWinLossReport();

                vAccountingWinLossReport.SetDataSource(dtDataset);
                vAccountingWinLossReport.SetParameterValue("@Zone", ZoneNo);
                vAccountingWinLossReport.SetParameterValue("@Category", MachineCategoryNo);
                vAccountingWinLossReport.SetParameterValue("@StartDate", StartDate);
                vAccountingWinLossReport.SetParameterValue("@EndDate", EndDate);
                vAccountingWinLossReport.SetParameterValue("@IncludeNonCashable", IncludeNonCashable);

                GetVersion_SiteName(out  sVersion, out  sSiteName);
                vAccountingWinLossReport.SetParameterValue("SiteName", sSiteName);
                vAccountingWinLossReport.SetParameterValue("ZoneName", ZoneName);
                vAccountingWinLossReport.SetParameterValue("CategoryName", CategoryName);
                vAccountingWinLossReport.SetParameterValue("Version", sVersion);
                vAccountingWinLossReport.SetParameterValue("Region", Settings.Region);
                vAccountingWinLossReport.SetParameterValue("CurrencyCulture", ExtensionMethods.CurrentCurrenyCulture);
                vAccountingWinLossReport.SetParameterValue("CurrencySymbol", ExtensionMethods.CurrentCurrenyCulture.GetCurrencySymbol());
                vAccountingWinLossReport.SetParameterValue("DateCulture", ExtensionMethods.CurrentDateCulture);
                vAccountingWinLossReport.SetParameterValue("SiteCode", Settings.SiteCode);


                crDatabase = vAccountingWinLossReport.Database;
                crTables = crDatabase.Tables;

                foreach (CrystalDecisions.CrystalReports.Engine.Table crTable in crTables)
                {
                    tableLogonInfo = crTable.LogOnInfo;
                    tableLogonInfo.ConnectionInfo = connectionInfo;
                    crTable.ApplyLogOnInfo(tableLogonInfo);
                }

                crystalReportViewer.ReportSource = vAccountingWinLossReport;

                AuditReports();
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     AccountingWinLossReport rpt = new AccountingWinLossReport();
     rpt.Site = this.Site;
     return rpt;
 }