|Dynamically set table name in onPrepare method [message #900927]
||Thu, 09 August 2012 02:37
| Thomas Spencer
Registered: August 2012
Hi all, newbie here looking for some assistance with dynamically naming a table in the onPrepare method.|
I have a report which has a table embedded inside a group, thus for every instance of the group the table is repeated. If the user tries to export the contents of this table from the web viewer they are faced with a list of duplicated names for the table e.g. myTable, myTable_1, myTable_[x] etc...
I wish to be able to dynamically name the table in each group to differentiate each instance of the table in the report to provide the user some help in selecting the correct table to export the data from.
For this table I can rename statically in an onPrepare script with this.name = 'newTableName'.
What I'm struggling with is dynamically generating a name based on where in the report the table is displayed i.e. under which group. I appreciate that the onPrepare method has no data bound and thus cant access its eventual contents.
My questions really are these:
Am I missing a straightforward solution to this?
Can I access other elements higher in the Outline hierarchy to utilise their values or are these not bound either when evaluating the onPrepare script for the child table?
Alternatively should I be looking at setting a parameter in an onCreate method of a parent table or again will this occur after the onPrepare for the child table?
Powered by FUDForum
. Page generated in 0.18285 seconds