Beispiel #1
0
        /// <summary>
        /// Refreshes the session summary report document
        /// </summary>
        /// <param name="date">The date of the session.</param>
        /// <param name="session">The number of the session.</param>
        /// <returns>The newly refreshed session summary report document.</returns>
        private ReportDocument RefreshSessionSummaryReport(DateTime date, short session)
        {
            // Clone the report so that if refreshes properly
            SessionSummaryReport = (ReportDocument)SessionSummaryReport.Clone();
            // Set the login info
            Report.SetDataSourceConnections(SessionSummaryReport, Settings);
            // Set the parameters again
            SessionSummaryReport.SetParameterValue("@OperatorId", OperatorId);
            SessionSummaryReport.SetParameterValue("@GamingDate", date);
            SessionSummaryReport.SetParameterValue("@Session", session);
            SessionSummaryReport.SetParameterValue("@IncludeMerchandise", 1);
            SessionSummaryReport.SetParameterValue("@IncludeConcessions", 1);
            SessionSummaryReport.SetParameterValue("@IncludePullTabs", 1);

            return(SessionSummaryReport);
        }
Beispiel #2
0
        /// <summary>
        /// Creates the report used in the application.
        /// </summary>
        /// <returns>true if succces; otherwise false.</returns>
        private bool CreateReport()
        {
            LoadingForm.Status = Resources.LoadingReport;
            try
            {
                SessionSummaryReport = Report.GetReport(ReportId.SessionSummary, CultureInfo.CurrentCulture.Name, Settings).Document;
                SessionSummaryReport.SetParameterValue("@OperatorId", OperatorId);
                SessionSummaryReport.SetParameterValue("@IncludeMerchandise", 1);
                SessionSummaryReport.SetParameterValue("@IncludeConcessions", 1);
                SessionSummaryReport.SetParameterValue("@IncludePullTabs", 1);
            }
            catch (Exception ex)
            {
                Logger.Log("Create Report failed: " + ex.Message, LoggerLevel.Severe);
                MessageWindow.Show(string.Format(CultureInfo.CurrentCulture, Resources.LoadingReportFailed, ex.Message), Resources.SessionSummaryName, MessageWindowType.Close);
                return(false);
            }

            return(true);
        }