I am trying to get the values of the report variables before sending it to the server. We have variables in the query string of the report that the user enters. Some variables have default values, for the case if the user did not select the data or the query, based on which the list of data for selection is formed, returned an empty result.
Example:
Data Source
u
Code: Select all
select id, name from users where id > 10
users_pre
Code: Select all
u.id, u.name
Code: Select all
IIF(users_pre.Count == 0, 123, users_pre.ToQueryString())
Code: Select all
viewer.onInteraction = function (args) {
if (args.action == 'Variables') {
variables = args.variables;
}
}
Can you tell in what event I can get the value of this variable? Perhaps I need to override some event?
I found that the value of this variable is calculated in the following method
Code: Select all
B.prototype.invokeConnecting
Code: Select all
d = t.System.Convert.toString(t.Report.Engine.StiParser.StiParser.parseTextValue(m, a))
In what event can this value be received before sending a request to the server, to be able to form a query string on the server?
Thanks.