Beispiel #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            ExpenseDetailsReport rpt = new ExpenseDetailsReport();

            rpt.Site = this.Site;
            return(rpt);
        }
        public void ShowExpenseDetailsReport(DataSet dsReportsDataSet, DateTime reportDate, string reportPeriod, bool IsGamingDayBasedReport,string SiteCode)
        {
            string sVersion = string.Empty;
            string sSiteName = string.Empty;
            
            try
            {
                LogManager.WriteLog("Inside ShowExpenseDetailsReport method", LogManager.enumLogLevel.Info);

                ExpenseDetailsReport expenseDetailsReport = new ExpenseDetailsReport();
            
                GetVersion_SiteName(out  sVersion, out  sSiteName);

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

                expenseDetailsReport.SetDataSource(dsReportsDataSet);

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

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

                expenseDetailsReport.SetParameterValue("Site", sSiteName);
                expenseDetailsReport.SetParameterValue("Version", sVersion);
                expenseDetailsReport.SetParameterValue("ReportDate", reportDate);
                expenseDetailsReport.SetParameterValue("ReportPeriod", reportPeriod);
                expenseDetailsReport.SetParameterValue("IsGamingDayBasedReport", IsGamingDayBasedReport);
                expenseDetailsReport.SetParameterValue("CurrencyCulture", ExtensionMethods.CurrentCurrenyCulture);
                expenseDetailsReport.SetParameterValue("DateCulture", ExtensionMethods.CurrentDateCulture);
                expenseDetailsReport.SetParameterValue("CurrencySymbol", ExtensionMethods.CurrentSiteCulture.GetCurrencySymbol());
                expenseDetailsReport.SetParameterValue("CurrencyCulture", ExtensionMethods.CurrentCurrenyCulture, "ExpenseDetailsSummaryReport.rpt");
                expenseDetailsReport.SetParameterValue("CurrencySymbol", ExtensionMethods.CurrentSiteCulture.GetCurrencySymbol(), "ExpenseDetailsSummaryReport.rpt");
                expenseDetailsReport.SetParameterValue("SiteCode", SiteCode);
                LogManager.WriteLog("Report Parameters set successfully", LogManager.enumLogLevel.Info);

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

                crystalReportViewer.ReportSource = expenseDetailsReport;

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

                AuditReports();

                strReportName = "Expense Details Report";

            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     ExpenseDetailsReport rpt = new ExpenseDetailsReport();
     rpt.Site = this.Site;
     return rpt;
 }