Ignore Error Message
Hi
Delphi XE2, RB 14.08 Enterprise, Advantage
I have a number of bespoke applications in the field where in addition to
the main application i also provide a separate automated report generator
used for printing weekly and month end reports. The automated report
generator has to run without intervention with no message dialogs. The
automated reports are designed and configured (where output is saved /
emailed to) from within the main bespoke application and can be run from
either the main or automated report application. The latter usually runs on
the server to make sure it is not turned off at month end.
The automated report application once written vary rarely needs looking at
again whereas the bespoke application is quite often changed. My problem
comes when there has been an update with Report Builder and a new feature
has been added which is not backward compatible (eg Foreground Design
Layers). If i modify the main application it will have the new features and
modify the reports when it runs them. The automated report generator (if i
have not updated it) will now encounter a problem and display an error
message / dialog waiting for user intervention. Usually if the user presses
the Ignore All option the report prints as intended. The problem though is
that this is invariable the following morning and the month end reports
which have timestamp related criteria in them are all incorrect.
I know a solution is to make sure that i update both applications at the
same time but this is easily overlooked. Is there any way of suppressing or
automatically responding to these error messages so they can run without
user intervention?
Thanks
Tim Murfitt
Delphi XE2, RB 14.08 Enterprise, Advantage
I have a number of bespoke applications in the field where in addition to
the main application i also provide a separate automated report generator
used for printing weekly and month end reports. The automated report
generator has to run without intervention with no message dialogs. The
automated reports are designed and configured (where output is saved /
emailed to) from within the main bespoke application and can be run from
either the main or automated report application. The latter usually runs on
the server to make sure it is not turned off at month end.
The automated report application once written vary rarely needs looking at
again whereas the bespoke application is quite often changed. My problem
comes when there has been an update with Report Builder and a new feature
has been added which is not backward compatible (eg Foreground Design
Layers). If i modify the main application it will have the new features and
modify the reports when it runs them. The automated report generator (if i
have not updated it) will now encounter a problem and display an error
message / dialog waiting for user intervention. Usually if the user presses
the Ignore All option the report prints as intended. The problem though is
that this is invariable the following morning and the month end reports
which have timestamp related criteria in them are all incorrect.
I know a solution is to make sure that i update both applications at the
same time but this is easily overlooked. Is there any way of suppressing or
automatically responding to these error messages so they can run without
user intervention?
Thanks
Tim Murfitt
This discussion has been closed.
Comments
There are two boolean properties to manage how template loading errors are
handled.
One option is to set Report.Template.IgnoreErrors to True so that all
template loading errors are ignored.
Another option is to set Report.Template.SuppressErrorDialog to True, so
that no dialog is displayed, but you can use Try..Except to detect that
errors occurred, for example you might want to write to an error log or show
a status message.
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com