Search the WinSPC Knowledgebase |
Browse by Category |
|
|
|
What is the difference between the OnGetText and OnBeforePrint event methods for a Text component? |
Thank you for rating this answer.
|
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.
|
Visitor Comments |
No visitor comments posted. Post a comment
|