Exemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            CrossPropertyLiabilityTransferDetailsReport rpt = new CrossPropertyLiabilityTransferDetailsReport();

            rpt.Site = this.Site;
            return(rpt);
        }
        internal void ShowCrossPropertyLiabilityTransferDetailsReport(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 vCrossPropertyLiabilityTransferDetailsReport = new CrossPropertyLiabilityTransferDetailsReport();

                vCrossPropertyLiabilityTransferDetailsReport.SetDataSource(dtDataset);

                vCrossPropertyLiabilityTransferDetailsReport.SetParameterValue("@STARTDATE", StartDate);
                vCrossPropertyLiabilityTransferDetailsReport.SetParameterValue("@ENDDATE", EndDate);

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


                crDatabase = vCrossPropertyLiabilityTransferDetailsReport.Database;
                crTables = crDatabase.Tables;

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


                crystalReportViewer.ReportSource = vCrossPropertyLiabilityTransferDetailsReport;

                AuditReports();

                strReportName = "Cross Property Liability Transfer Details Report";
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     CrossPropertyLiabilityTransferDetailsReport rpt = new CrossPropertyLiabilityTransferDetailsReport();
     rpt.Site = this.Site;
     return rpt;
 }