Using Parameters in SQL Query
Наши примеры проектов и шаблоны отчётов помогут Вам разобраться в основах работы с нашими продуктами.SQL query parameters can be given values on the server in the
Set a parameter value in the data event.
How it works. Parameter values are applied on the server, so query filters stay confidential and are not exposed to the client.
onBeginProcessData event — the values never reach the client.Set a parameter value in the data event.
def beginProcessData(args: StiDataEventArgs):
if args.dataSource == 'customers' and len(args.parameters) > 0:
args.parameters['Country'].value = 'Germany'
viewer.onBeginProcessData += beginProcessDataonBeginProcessData— fires before the database request; inspectargs.dataSourceto target the right query.args.parameters['Country'].value— set the SQL parameter server-side; changes are not sent to the browser.
How it works. Parameter values are applied on the server, so query filters stay confidential and are not exposed to the client.