Re: Dynamic Task Selection [message #2021 is a reply to message #2019] |
Mon, 27 April 2009 06:08 |
AJM
Messages: 2371 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
If you only wish to make minor adjustments to the report layout you have the followng options:
- You can modify the contents of $GLOBALS['report_structure'] before it is processed. You can do this in the _cm_initialise() method.
- You can replace the report structure file before it is processed with code similar to the following:
$GLOBALS['report_structure'] = getReportStructure ($filename); You can do this in the _cm_initialise() method.
- If you wish to have a separate task for each different layout, but you wish your users to access a single controlling task which then decides which actual task to use, then you need to create a controlling task which does the following:
- It has no dialog with the user, so there is no screen to display and no need to wait for user input. It does what it does, then terminates.
- After identifying which actual reporting task needs to be executed it needs to switch to that task.
This can be done as follows:
- You can use a pattern such as ADD4 or UPDATE4, but tell it not to insert or update anything by returning an empty array from the _cm_pre_insertMultiple() or _cm_pre_updateMultiple() methods.
- You can switch to another task by using the append2scriptSequence() function.
I hope this helps.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|