public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { StackerLevelDetailsReport rpt = new StackerLevelDetailsReport(); rpt.Site = this.Site; return(rpt); }
public void ShowStackerLevelDetailReport(DataSet dsStackerDetails, int StackerLevel,string siteCode) { string sVersion = string.Empty; string sSiteName = string.Empty; try { LogManager.WriteLog("Inside ShowStackerLevelDetailReport method", LogManager.enumLogLevel.Info); StackerLevelDetailsReport stackerDetailReport = new StackerLevelDetailsReport(); GetVersion_SiteName(out sVersion, out sSiteName); LogManager.WriteLog("Setting Report Datasource...", LogManager.enumLogLevel.Info); stackerDetailReport.SetDataSource(dsStackerDetails); stackerDetailReport.SetParameterValue("SiteName", sSiteName); stackerDetailReport.SetParameterValue("Version", sVersion); stackerDetailReport.SetParameterValue("@StackerLevel", StackerLevel); stackerDetailReport.SetParameterValue("CurrencyCulture", ExtensionMethods.CurrentCurrenyCulture); stackerDetailReport.SetParameterValue("DateCulture", ExtensionMethods.CurrentDateCulture); stackerDetailReport.SetParameterValue("CurrencySymbol", ExtensionMethods.CurrentSiteCulture.GetCurrencySymbol()); stackerDetailReport.SetParameterValue("SiteCode", siteCode); //stackerDetailReport.SetParameterValue("CurrencyCulture", ExtensionMethods.CurrentCurrenyCulture, "StackerLevelDetailsReport.rpt"); //stackerDetailReport.SetParameterValue("CurrencySymbol", ExtensionMethods.CurrentSiteCulture.GetCurrencySymbol(), "StackerLevelDetailsReport.rpt"); 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; crDatabase = stackerDetailReport.Database; crTables = crDatabase.Tables; foreach (CrystalDecisions.CrystalReports.Engine.Table crTable in crTables) { tableLogonInfo = crTable.LogOnInfo; tableLogonInfo.ConnectionInfo = connectionInfo; crTable.ApplyLogOnInfo(tableLogonInfo); } crystalReportViewer.ReportSource = stackerDetailReport; LogManager.WriteLog("Report Source set successfully", LogManager.enumLogLevel.Info); AuditReports(); strReportName = "Stacker Level Details Report"; } catch (Exception ex) { throw ex; } }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { StackerLevelDetailsReport rpt = new StackerLevelDetailsReport(); rpt.Site = this.Site; return rpt; }