How to catch exception on report preparation ?

edited November 2014 in FastReport VCL 5
Hello,

I have a problem : I don't know how to catch an exception during report preparation.
This code has no effect :
  try
    Result := frxReport1.PrepareReport();
  except
   on e: exception do
    Result := FALSE;
  end;

This is not important but I'm using Devart UniDAC fastReport component. In my case, an error is occurring while opening the Dataset. I have so far no option to catch this !

Comments

  • edited 5:28PM
    This is a workaround.
      frxReport1.PrepareReport;
    
      if ((frxReport1.Errors.Count <> 0)) then
        abort;
    

    My problem is that report is still showing a dialogbox. Ins't there a property as "SiltentError" or "NoMessageOnError" ?
  • gpigpi
    edited 5:28PM
    wrote:
    My problem is that report is still showing a dialogbox. Ins't there a property as "SiltentError" or "NoMessageOnError" ?
    Try to set TfrxReport.EngineOptions.SilentMode to True and TfrxReport.EngineOptions.NewSilentMode to simSilent

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.