public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            NonSGVILiquidation rpt = new NonSGVILiquidation();

            rpt.Site = this.Site;
            return(rpt);
        }
        //
        public void ShowNonSGVILiquidationReport(DataSet dsReportsDataSet, DataSet dsSummaryReport, int BatchNo)
        {
            string sVersion = string.Empty;
            string sSiteName = string.Empty;

            try
            {
                LogManager.WriteLog("Inside ShowLiquidationReport method", LogManager.enumLogLevel.Info);

                GetVersion_SiteName(out  sVersion, out  sSiteName);

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

                TableLogOnInfo tableLogonInfo = new TableLogOnInfo();

                NonSGVILiquidation LiquidationReport = new NonSGVILiquidation();
                BMC.Presentation.POS.Reports.NonSGVILiquidationSummary LiquidationSummaryReport = new BMC.Presentation.POS.Reports.NonSGVILiquidationSummary();

                LogManager.WriteLog("Setting Report Datasource...", LogManager.enumLogLevel.Info);

                LiquidationReport.SetDataSource(dsReportsDataSet);
                LiquidationSummaryReport.SetDataSource(dsSummaryReport);

                LogManager.WriteLog("Report DataSource set successfully", LogManager.enumLogLevel.Info);

                LogManager.WriteLog("Setting Report Parameters...", LogManager.enumLogLevel.Info);

                LiquidationReport.SetParameterValue("@Batch_No", BatchNo);
                LiquidationSummaryReport.SetParameterValue("@Batch_No", BatchNo);


                IReports objReports = String.IsNullOrEmpty(_ExchangeConnectionString) ? ReportsBusinessObject.CreateInstance() : ReportsBusinessObject.CreateInstance(_ExchangeConnectionString, _TicketingConnectionString);

                List<ServerDetails> DbConnectionInfo = String.IsNullOrEmpty(_ExchangeConnectionString) ? objReports.GetDataBaseConnectionString() : objReports.GetDataBaseConnectionString(_ExchangeConnectionString);

                ConnectionInfo myConnectionInfo = new ConnectionInfo();


                myConnectionInfo.ServerName = DbConnectionInfo[0].ServerName;  // read this information from config file.
                myConnectionInfo.DatabaseName = DbConnectionInfo[0].DataBase; // read this information from config file.
                myConnectionInfo.UserID = DbConnectionInfo[0].Username;  // read this information from config file.
                myConnectionInfo.Password = DbConnectionInfo[0].Password;  // read this information from config file.


                crDatabase = LiquidationReport.Database;
                crTables = crDatabase.Tables;

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

                crDatabase = LiquidationSummaryReport.Database;
                crTables = crDatabase.Tables;

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

                ReportDocument doc = LiquidationReport.OpenSubreport("NonSGVILiquidationSummary.rpt");
                doc.SetDataSource(dsSummaryReport);

                LogManager.WriteLog("Report Parameters set successfully", LogManager.enumLogLevel.Info);


                LogManager.WriteLog("Setting Report Source...", LogManager.enumLogLevel.Info);


                crystalReportViewer.ReportSource = LiquidationReport;


                LogManager.WriteLog("Report Source set successfully", LogManager.enumLogLevel.Info);

                AuditReports();

                strReportName = "System Balancing Report";
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     NonSGVILiquidation rpt = new NonSGVILiquidation();
     rpt.Site = this.Site;
     return rpt;
 }