Missing variables in $event

Stimulsoft Reports.PHP discussion
Post Reply
ebelair
Posts: 3
Joined: Wed May 22, 2019 7:51 am

Missing variables in $event

Post by ebelair »

Hi, I try to use the php lib and parse a mrt file that contain a variable in the query. The variable is named {where}
In the StiHandler()->onBeginProcessData($event) method $event->parameters is empty, is it normal behaviour?
If I manually set the variable like this :

Code: Select all

$event->parameters["where"] = "foobar";
The queryString is not modified.
So, how to handle parameters correctly?

I'm using ultimate 2019.2.3 in demo
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Missing variables in $event

Post by HighAley »

Hello.

The first suggestion is to try to rename the variable.
Some reserved names are not available.

How do you use the variable in your query?
What do you get there?

Thank you.
ebelair
Posts: 3
Joined: Wed May 22, 2019 7:51 am

Re: Missing variables in $event

Post by ebelair »

I could figure out by encrypting the query inside the xml in mrt file (we don't want that the query is publicly visible in the file).
Then I've unencrypted it in the handler and I get the query as it with the {where} inside. So I could set the parameter and the file is working.
Lech Kulikowski
Posts: 6237
Joined: Tue Mar 20, 2018 5:34 am

Re: Missing variables in $event

Post by Lech Kulikowski »

Hello,

Ok. Please let us know if you need any additional help.

Thank you.
Post Reply