Hi Metzlerd, First of all , I wanted to thank you for the module is great and really sorry for my english (I'm argentinian).
I need insert the report parameters with the fixed values, without do an sql consult from database, for example:

<select id="allMonthsOfYear">
  <option value="january">January</option>
  <option value="febrary">Febrary</option>
  <option value="march">March</option>
  <option value="april">April</option>
  bla bla bla ...
</select>

It's that possible ???
Thank you so much !
Regards.

Comments

jpfrancesconi created an issue. See original summary.

jpfrancesconi’s picture

Issue summary: View changes
jpfrancesconi’s picture

Assigned: jpfrancesconi » Unassigned
metzlerd’s picture

Category: Feature request » Support request

Yes it is quite possible. Although most data blocks in forena are created as SQL data blocks, forena has the ability define data blocks that are constant using XML data blocks as well. An example of an XML data block can be found at:

http://cgit.drupalcode.org/forena/tree/repos/forena_help/switches.xml

These data blocks can be used as data sources for select parameters. In the same folder as your .sql file, create an XML file that expresses the options that you need... something like:

<?xml version="1.0" encoding="UTF-8"?>
<options>
  <option>
    <value>january</value>
    <label>January</label>
  </option> 
  <option>
    <value>february</value> 
    <label>February</label> 
  </option>
   bla bla bla ...
</options>

If you named this file "months.xml" and put it in the same folder as your SQL data blocks, you could reference a data soruce of "youdata/months" for the select options of a "select" parameter. Does this make sense to you?

metzlerd’s picture

PS: Drupal is an international community.... you never need to apologize for your english skills here. ;)

Dave

jpfrancesconi’s picture

God bless you , dear Dave . You've been very helpful.
I hope soon to receive some news from Forena !
When you come to Argentina, you are my guest of honor ;)