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

Dynamic variable options in PHP reports?

Open rick-cti opened this issue 9 years ago • 4 comments

For MySQL reports, it's possible to use database_options to bring in dynamic options for a select variable. With PHP reports, it seems only the options property is available, and these options can't be dynamically generated by the PHP code as the report headers must appear at the top of the file.

Is it possible to dynamically generate variable options within the PHP report itself?

Many thanks.

rick-cti avatar Mar 09 '16 10:03 rick-cti

I have this question as well. It's been asked on the Forum over here a couple times but is unanswered. I posted again there.

nwgarner avatar Mar 09 '16 18:03 nwgarner

I've created a dynamic header that will allow you to do what you want. Put it in your classes/local/header and you should be good. See the patch above for examples on how to use.

davidmichaelakers avatar Jun 10 '16 13:06 davidmichaelakers

Hi rick-cti,

The framework won't display options for another table for select. I'm using mysql, how did you manage to do that? It's really giving me headache.

haglerw avatar Aug 31 '18 09:08 haglerw

I just found what's been the issue, I did not have a closing }, thanks.

haglerw avatar Aug 31 '18 09:08 haglerw