How to pass parameters using the html5 designer ?

Stimulsoft Reports.PHP discussion
Post Reply
reno77
Posts: 6
Joined: Fri Feb 26, 2016 1:18 pm

How to pass parameters using the html5 designer ?

Post by reno77 »

Hi ,
I tried the flex version of the designer and was able to pass sql parameters to it .
The clients wants to use the HTML5 designer instead, but I can't figure out how to pass parameters to it,
since there's no parameter option in the UI.

For one I'm doing a search replace using php to replace the variable in the .mrt file.
Is it possible to do it straight from the designer UI instead ?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to pass parameters using the html5 designer ?

Post by HighAley »

Hello.

Which version of our product do you use?
You could create a Variable and select the Request From User option.
If you need additional information about how to create such variable, you could look at the Creating Report with Parameters: Selecting Country tutorial video.

Thank you.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: How to pass parameters using the html5 designer ?

Post by Vladimir »

Hello,

We will soon add support for parameters in the HTML5 designer, most likely it will be available in the prerelease build on the next week.

Thank you.
reno77
Posts: 6
Joined: Fri Feb 26, 2016 1:18 pm

Re: How to pass parameters using the html5 designer ?

Post by reno77 »

Thanks Vladimir !
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: How to pass parameters using the html5 designer ?

Post by Vladimir »

Hello,

Please check the latest version; it should support the SQL query parameters as variables. For example:

Code: Select all

SELECT * FROM {Var1}
If you want to pass parameters to a report via the URL string as it is made in Flash, please use the following JavaScript code:

Code: Select all

function getUrlVars() {
    var vars = {};
    var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,
        function (m, key, value) {
            vars[key] = value;
    });
    return vars;
}

var vars = getUrlVars();
report.dictionary.variables.list.forEach(function(item, i, arr) {
    if (typeof vars[item.name] != "undefined") item.valueObject = vars[item.name];
});
Thank you.
reno77
Posts: 6
Joined: Fri Feb 26, 2016 1:18 pm

Re: How to pass parameters using the html5 designer ?

Post by reno77 »

Hi Valdimir ,

Is the new version supposed to be in pre-release here , https://www.stimulsoft.com/en/downloads/reports-php ?
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: How to pass parameters using the html5 designer ?

Post by Vladimir »

Hello,

Team leader says it should be available in the official release 2016.1
You can download it from the product page.

Thank you.
Post Reply