GenoPro Developer Home
GenoPro Home  |  SDK Home  |  Report Generator  |  Support  |  Search  |  Help  |  Site Map

Skip Navigation Links.

Report.LogError Method

The LogError method is for displaying an error message to the user. The error message will be displayed in the "Message Log" in the red color. The report generator has a built-in mechanism to prevent the same error message from being displayed more than once, so you can use the LogError method without worrying about the same error message being displayed thousand of times if a template is used repetitively. The LogError method automatically appends the new line character to the message log, so you do not need to append the vbCRLF string.

In the future, there will be other methods such as LogWarning and LogComment methods. Those method will behave similar to LogError but will display the text in a different color.

Usage:
The LogError is usually followed by the method AbortReport.

Report.LogError "Error loading essential Component X"
Report.AbortReport

Architecture Design:
The LogError is a method of the Report object rather than being a method of the ReportGenerator object. After all, it would make more sense to use ReportGenerator.LogError rather than Report.LogError. The rationale of this design decision is for future growth, as a single ReportGenerator object may have many Report objects running simultaneously. By having the method LogError part of the report stream, it will make troubleshooting much easier by knowing which script logged the error.

See Also:
AbortPage
AbortTemplate
AbortReport

 

Copyright ┬ę 1998-2014. All rights reserved. GenoPro┬« and the GenoPro logo are registered trademarks.