Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
How to set report wide settings read from db
costinb
Hey,
I have a table containing some report settings: number of digits for some fields, depth of departmental structure, etc.
How can I access them from a beforeOpen script of a dataSource?
A real world example would be: build a dynamic queryString based on the depth of the departmental structure.
One of the ideas is to build a dataset retrieving all needed options and linking it to a hidden listbox parameter. But then I need to be able to retrieve the list of possible values (independent of what is selected in the listbox). Does anyone know how to do that?
Another way would be to retrieve data from the dataset directly, but again - having problems figuring out how.
Any tips?
Thanks,
Costin
Find more posts tagged with
Comments
Monma
I am not sure I understand everything you are doing but you can set a dynamic parameter to a dataset and retrieve all the values. The user or your code would have to select all the values which you can access using:<br />
<br />
params["MyNewParam"].value
<br />
<br />
where i indexes the record returned from you dataset.
costinb
No, you didn't understand
I was talking about building a set of report wide variables, read from the db and used throughout the report for setting numbers of decimals and other generic settings.
I ended up setting up dynamic page variables in the onfetch event of a dataset retrieving all the needed options.
Also, had to add a hidden table linked to that dataset, otherwise onfetch wouldn't fire...
Any idea how to optimize this?