Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I can add parameter values on report like by using {parm.someparameter}.
But what to do for case when I need to output listbox description values?
F.ex.:
I have a listbox with values and descriptions:
1 Used
2 Unused
3 Failed
When first two are selected for report then we will see in report head:
Parameter A: 1 Used, 2 Unused
There are way to create specific datablocks for this reason, that will be almost the same as for parameter listboxes.
Are there any way to use existing data from parameter listboxes?
Comments
Comment #2
metzlerd CreditAttribution: metzlerd as a volunteer and commentedIf the data is in the database, I usually create a data block that looks up the parameter description from the table in question, or add it as a join clause on the data and pull it in that way.
If the data is XML data blocks then the only way to create the references in the reports is to use calc fields to look up values. The two tasks that you need to be able to do are:
1.) Add an FrxData element to the head of the report to load the data values. Unfortunately currently the report parameters lists are not loaded in to custom contexts yet.
2.) Create an frx:field element that uses a calculation to look up the value in the XML.
I'm not sure if I am making sense here, but I'd need to know a bit more about where your lookup values are currently stored in order to advise you on the most straightforward approach.
Comment #3
janeks CreditAttribution: janeks as a volunteer commentedThe data is in database only.