The BeforeQuery<PageName> event is executed before the SELECT SQL query is processed. Use this event if you like to modify the default SQL query, add a WHERE clause, etc.
Note: this event has a limited use scope. Changes made to SQL query or to WHERE clause will be only applied to data in the grid on the List page. It will not apply to filters, auto-suggest, View or Edit pages. We recommend using a more flexible technique explained in Dynamic SQL Query article instead.
BeforeQuery<PageName>($strSQL, $strWhereClause, $strOrderBy, $pageObject)
an SQL query to be executed.
a WHERE clause to apply to the SQL query.
an ORDER BY query to apply to the SQL query.
an object representing the current page. For more information, see RunnerPage class.
Applies to pages
List, Print, Export, Chart.
•Choose page screen
•SQL query screen
•About SQLQuery class