php-reports icon indicating copy to clipboard operation
php-reports copied to clipboard

Unable to use multi-select with dynamic options on MySQL report

Open ghost opened this issue 7 years ago • 1 comments

I am trying to use the database options to generate a dynamic multi-select, and that is rendering correctly. But, it is not generating the expected query and results. Any ideas?

Example header: -- VARIABLE: { -- name: "aldest", -- display: "A/L Dest Airport", -- type: "select", -- multiple: true, -- database_options: {table:"Example.active_branches", display:"id", column:"id", where:"1=1"} -- }

Macro: [aldest] => Array ( [0] => ABE [1] => BUF [2] => CLE )

Report Options Array: [aldest] => Array ( [name] => aldest [display] => A/L Dest Airport [type] => select [multiple] => 1 [database_options] => Array ( [table] => Example.active_branches [display] => id [column] => id [where] => 1=1 )

                [empty] => 
                [format] => Y-m-d H:i:s
            )

Relevant line in my query from the .sql file: -- A/L Dest Airport Range and aldest = '{{ aldest }}'

Relevant line from Generated Query in Debug: -- A/L Dest Airport Range and aldest = 'Array'

ghost avatar Jan 18 '18 20:01 ghost