Exemplo n.º 1
0
        public void ImportReport(EjpLib.BaseClasses.ejpReport report, Guid parentStudyId)
        {
            try
            {
                this._reportObject      = report;
                this._textArea.Document = report.Document;
                this._parentStudyId     = parentStudyId;
                this._textArea.Measure(Size.Empty);
                this._textArea.UpdateLayout();
                this.UpdateLetterCount();
            }
            catch (Exception ex)
            {
                SiliconStudio.DebugManagers.DebugReporter.Report(
                    SiliconStudio.DebugManagers.MessageType.Error,
                    "EjpControls - Report Editor",
                    "Failed to Import Report" +
                    "\nReport ID: " + this._reportObject.Id.ToString() +
                    "\nError: " + ex.Message);

                throw new ApplicationException(
                          "Failed to load a Report in the current Assignment.\n" +
                          "Perhaps the Assignment was created with an" +
                          "earlier version of eJournalPlus?");
            }
        }
Exemplo n.º 2
0
 public void ImportReport(EjpLib.BaseClasses.ejpReport report, Guid parentStudyId)
 {
     try
     {
         this._reportObject  = report;
         this._parentStudyId = parentStudyId;
         //  [shiniwa] uncomment out here to get repro...
         //this._textArea.Document = report.Document;
         this._textArea.Measure(Size.Empty);
         this._textArea.UpdateLayout();
         this.UpdateLetterCount();
         //  Let's buffer the FlowDocument in RTB... it'll be automatically attached when it is absolutely needed.
         this._textArea.DocumentAttached = report.Document;
     }
     catch (Exception)
     {
         throw new ApplicationException(Application.Current.Resources["EX_ReportLoadFailed_Version"] as string);
     }
 }