Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
There are two cases when we would need insert parameters in the report:
One is for selected parameters value output in the report. F.ex. it is good for PDF reports - so that user would know what a report is about from the view of selected parameters.
The second is for embedded elements like SVG charts, GeoMaps etc.
When there are single value parameters it is o'k, but not so when there is multivalue parameters.
Now the simple version with parameters as spaces separated list - works for first case, but for second - needs at least some JS hacking. I recently started tinkering around graphs in Forena and found that in multivalue cases we need the form:
aparam[avalue]=avalue&aparam[bvalue]=bvalue.
BTW: q. - do wee need these [avalue] as duplicates if we have the same after "="?
But for feature requested - could it be so that we have two ways of parameter templates:
{parm.myparm.list} that outputs space separated list (also default for {parm.myparm})
and
{parm.myparm.url} that outputs URL like string.
First, the correct syntax for multivalue parameters is
aparm[]=firstvalue&aparm[]=value2
This is the way that url parameters are supposed to be expressed. If you just need the values for javascript would it be better to to pass them in as a json object in the drupal settings array? That way you could reference the raw values as needed?
The latest version of forena already treats parameters differently based on how they are being used. This may complicate issues.
If you could give a brief example of the context thst you need these in it would help us understand whether they can be accomplished via existing functionality.
F.ex. in case of embeded charts . I want that chart will use the same parameters like parent report an that can be multi value parameters.
Regarding right parameter URL syntax - my previous example was taken from addres bar of browser after submiting a report paramter form with multivalue parameters.
Got it. Let me check out the FrxInclude renderer, I think the best approach would be to find a simple way to pass all the parameters through at once. I did something link this for links, so I might try that approach instead. Would that work?
Probably the syntax you are getting is using is coming from the drupal Checkboxes control. If it were a select it would come out differently. I'll look into cleaning that up as well.
This has been fixed. You can now include multivalue parameter references in the source (and in links). So if you reference this in the FrxInclude source or in links as
reports/myreport?myparm={parm.somemultivalueparm}
And the parameter is an array, it will be included as an array in the link that is generated.
Comments
Comment #1
metzlerd commentedYou can. Sorry I haven't documented it better. Prefix it with parm.
Comment #2
janeks commentedWhat about multivalue parameter output in a report:
All that I got was:
ArrayBut I would need someting like:
aVal1 aVal2Comment #3
metzlerd commentedYes you are correct, that would be nice. I'll get to working on this when I can.
Comment #4
metzlerd commentedArray parameters display space separated in the report.
Comment #6
janeks commentedThere are two cases when we would need insert parameters in the report:
One is for selected parameters value output in the report. F.ex. it is good for PDF reports - so that user would know what a report is about from the view of selected parameters.
The second is for embedded elements like SVG charts, GeoMaps etc.
When there are single value parameters it is o'k, but not so when there is multivalue parameters.
Now the simple version with parameters as spaces separated list - works for first case, but for second - needs at least some JS hacking. I recently started tinkering around graphs in Forena and found that in multivalue cases we need the form:
aparam[avalue]=avalue&aparam[bvalue]=bvalue.
BTW: q. - do wee need these [avalue] as duplicates if we have the same after "="?
But for feature requested - could it be so that we have two ways of parameter templates:
{parm.myparm.list} that outputs space separated list (also default for {parm.myparm})
and
{parm.myparm.url} that outputs URL like string.
brgds
Janeks
Comment #7
metzlerd commentedFirst, the correct syntax for multivalue parameters is
aparm[]=firstvalue&aparm[]=value2
This is the way that url parameters are supposed to be expressed. If you just need the values for javascript would it be better to to pass them in as a json object in the drupal settings array? That way you could reference the raw values as needed?
The latest version of forena already treats parameters differently based on how they are being used. This may complicate issues.
If you could give a brief example of the context thst you need these in it would help us understand whether they can be accomplished via existing functionality.
Comment #8
janeks commentedF.ex. in case of embeded charts . I want that chart will use the same parameters like parent report an that can be multi value parameters.
Regarding right parameter URL syntax - my previous example was taken from addres bar of browser after submiting a report paramter form with multivalue parameters.
Comment #9
metzlerd commentedGot it. Let me check out the FrxInclude renderer, I think the best approach would be to find a simple way to pass all the parameters through at once. I did something link this for links, so I might try that approach instead. Would that work?
Probably the syntax you are getting is using is coming from the drupal Checkboxes control. If it were a select it would come out differently. I'll look into cleaning that up as well.
Dave
Comment #10
metzlerd commentedThis has been fixed. You can now include multivalue parameter references in the source (and in links). So if you reference this in the FrxInclude source or in links as
reports/myreport?myparm={parm.somemultivalueparm}
And the parameter is an array, it will be included as an array in the link that is generated.