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

            rpt.Site = this.Site;
            return(rpt);
        }
        internal void ShowCrossPropertyTicketAnalysisReport(string p, DataSet dtDataset, DateTime StartDate, DateTime EndDate)
        {

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

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

                connectionInfo.ServerName = DbConnectionDetails.ServerName;
                connectionInfo.UserID = DbConnectionDetails.UserName;
                connectionInfo.Password = DbConnectionDetails.Password;
                connectionInfo.DatabaseName = DbConnectionDetails.DatabaseName;
                
                string sVersion, sSiteName;

                var vCrossPropertyTicketAnalysis = new CrossPropertyTicketAnalysis();

                vCrossPropertyTicketAnalysis.SetDataSource(dtDataset);
                vCrossPropertyTicketAnalysis.SetParameterValue("SiteCode", Settings.SiteCode);
                vCrossPropertyTicketAnalysis.SetParameterValue("fromDate", StartDate);
                vCrossPropertyTicketAnalysis.SetParameterValue("toDate", EndDate);
                vCrossPropertyTicketAnalysis.SetParameterValue("@STARTDATE", StartDate);
                vCrossPropertyTicketAnalysis.SetParameterValue("@ENDDATE", EndDate);

                GetVersion_SiteName(out  sVersion, out  sSiteName);
                vCrossPropertyTicketAnalysis.SetParameterValue("siteName", sSiteName);
                vCrossPropertyTicketAnalysis.SetParameterValue("BMCVersion", sVersion);
                vCrossPropertyTicketAnalysis.SetParameterValue("CurrencyCulture", ExtensionMethods.CurrentCurrenyCulture);
                vCrossPropertyTicketAnalysis.SetParameterValue("CurrencySymbol", ExtensionMethods.CurrentCurrenyCulture.GetCurrencySymbol());
                vCrossPropertyTicketAnalysis.SetParameterValue("DateCulture", ExtensionMethods.CurrentDateCulture);


                crDatabase = vCrossPropertyTicketAnalysis.Database;
                crTables = crDatabase.Tables;

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

                crystalReportViewer.ReportSource = vCrossPropertyTicketAnalysis;

                AuditReports();

                strReportName = "Voucher Listing Report";
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     CrossPropertyTicketAnalysis rpt = new CrossPropertyTicketAnalysis();
     rpt.Site = this.Site;
     return rpt;
 }