WinSPC Knowledgebase Home | Glossary | Favorites | Contact | Login WinSPC Knowledgebase Home | Glossary | Favorites | Contact | Login
Search the WinSPC Knowledgebase Browse by Category
What is the difference between the OnGetText and OnBeforePrint event methods for a Text component?
Article Details

Last Updated
16th of March, 2012

Applies to
WinSPC 8.0, WinSPC 8.1, WinSPC 8.2, WinSPC 8.3

The OnBeforePrint event is an event in the RAVE (report template) script that is called each time the component will be printed, regardless of if the component is visible or invisible.  For example, if a Text component will print 10 times on a page (due to it being on a data band that prints 10 times), then the OnBeforePrint event will be called 10 times.  This event is useful for making conditional modifications to the component (or sub-components) that affect the output.  For example, this event could be used to change the text color of the component based on some condition.  Most components have an OnBeforePrint event.

The OnGetText event is an event in the RAVE (report template) script that is called each time the component is going to visibly print some text.  This event is not called if the component is invisible.  This event is useful to override (or change) the text that will be displayed by this component.  For example, this event could be used to append additional text to the text that was going to be printed (changing "ABC" to "1 ABC" if desired).  Only components that have a text output (such as a Text or DataText component) have this event.

If a component has both an OnBeforePrint and OnGetText event, the OnBeforePrint event is called before the OnGetText event.
Attachments
No attachments were found.
Related Articles
Visitor Comments
No visitor comments posted. Post a comment
Post Comment for "What is the difference between the OnGetText and OnBeforePrint event methods for a Text component?"
To post a comment for this article, simply complete the form below. Fields marked with an asterisk are required.
   Your Name:
   Email Address:
* Your Comment:
* Enter the code below:
 

All Content ©2010-2021 DataNet Quality Systems. All Rights Reserved.