Page 1 of 1
How to pass parameters using the html5 designer ?
Posted: Fri Feb 26, 2016 1:23 pm
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 ?
Re: How to pass parameters using the html5 designer ?
Posted: Fri Feb 26, 2016 2:12 pm
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.
Re: How to pass parameters using the html5 designer ?
Posted: Fri Feb 26, 2016 2:19 pm
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.
Re: How to pass parameters using the html5 designer ?
Posted: Sat Feb 27, 2016 11:31 am
by reno77
Thanks Vladimir !
Re: How to pass parameters using the html5 designer ?
Posted: Mon Feb 29, 2016 6:31 am
by Vladimir
Hello,
Please check the latest version; it should support the SQL query parameters as variables. For example:
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.
Re: How to pass parameters using the html5 designer ?
Posted: Mon Feb 29, 2016 4:27 pm
by reno77
Hi Valdimir ,
Is the new version supposed to be in pre-release here ,
https://www.stimulsoft.com/en/downloads/reports-php ?
Re: How to pass parameters using the html5 designer ?
Posted: Tue Mar 01, 2016 7:46 am
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.