passing parameter for report.php through POST or GET

Stimulsoft Reports.PHP discussion
Post Reply
simbawave
Posts: 9
Joined: Sun Jan 17, 2021 3:47 am

passing parameter for report.php through POST or GET

Post by simbawave »

dear stimulsoft,

i'm very new to this new stimulsoft reports.php.
previously i was using report.php flash so it was really easy for passing parameters through URL using POST or GET like this

Code: Select all

http://localhost/sreportflex/stimulsoft/index.php?stimulsoft_client_key=ViewerFx&stimulsoft_report_key=reportname.mrt&variablename=value
for example

Code: Select all

http://localhost/sreportflex/stimulsoft/index.php?stimulsoft_client_key=ViewerFx&stimulsoft_report_key=totalgrossout.mrt&kodepr=123456
previously after i called that URL, the reports did the query then showing the reports.

now flash is dead, and i have no way but dealing with stimulsoft 2020.5.2, of course report.php.

here what i have done for migrating reports.
1. i added variable to make this mrt as the same before when i used flash
Image

2. this is when i published
Image

is there anyway i have to do so my report is able to accept POST or GET then the report can continue with the SQL and showing data like it did in flash?
or should i edit something before or after i publish?

please kindly help me.
many thanks
simbawave
Posts: 9
Joined: Sun Jan 17, 2021 3:47 am

Re: passing parameter for report.php through POST or GET

Post by simbawave »

finally i made it by manual modification after publishing, in 2 files:
1. index.php
i replaced the code become

Code: Select all

$options->handler = "handler.php?kodepr=".$_GET["kodepr"];
2. handler.php

Code: Select all

	$args->parameters["kodepr"] = $_GET["kodepr"];
	$args->queryString="select*from rekapgajiview where kodepr='{kodepr}'
and (statusstaf='F' or statusstaf='B')
and (tglkeluar between tglawal and tglakhir)
order by induk, namabag, namasub, nama";
The attachment edited files.rar is no longer available
and this is how i set variable in designer since the image link was broken
The attachment Setting Variable.jpg is no longer available
and this is my publish setting
edited files.rar
(1.44 KiB) Downloaded 298 times
i replaced those files after deploy on web server using notepad++, just like editing text.
it works and accepting parameter.

is it the proper workflow or what i'm doing is kind of quick and dirty solution?

many thanks
Lech Kulikowski
Posts: 6163
Joined: Tue Mar 20, 2018 5:34 am

Re: passing parameter for report.php through POST or GET

Post by Lech Kulikowski »

Hello,

Unfortunately, at the current moment, that feature is not available.

We have added that task to our to-do list.

Thank you.
simbawave
Posts: 9
Joined: Sun Jan 17, 2021 3:47 am

Re: passing parameter for report.php through POST or GET

Post by simbawave »

many thanks for replying.
yes i made it through modification manually after publishing.
Lech Kulikowski
Posts: 6163
Joined: Tue Mar 20, 2018 5:34 am

Re: passing parameter for report.php through POST or GET

Post by Lech Kulikowski »

Hello,

You are welcome.
Lech Kulikowski
Posts: 6163
Joined: Tue Mar 20, 2018 5:34 am

Re: passing parameter for report.php through POST or GET

Post by Lech Kulikowski »

Hello,

Was have added a new option:
StiOptions.WebServer.passQueryParametersToReport = true;

It will be available in the release 2021.2

Thank you.
Post Reply