A few examples are:
Background on how IRs are saved:
There are two distinct means of saving IRs - As "Default" reports performed by developers when running the application from the Application Builder and users saving reports at runtime.
When a developer saves a default report then that report definition is used to render the report in the runtime environment. When a user saves an IR it is saved into the APEX meta-data tables using the unique id for the report against that user. The unique id is based on the specific region id of the IR. This is critical when discussing issues being faced and their solutions below.
If the application is a PUBLIC application then Users will not be given the option to save IRs as there is no user details to associate that report with so every user would then see everyone's saved reports.
Basically there are three main issues being raised:
- Preserving user saved IRs when rebuilding environments
- Preserving user saved IRs when updating application
- Sharing user saved IRs between different users
This issue relates to the ability to backup user saved IRs so that should you need to migrate your applications from one server to another or restore from backups then users will not lose their saved reports.
In APEX 3.2 we have resolved this issue by allowing you to save these reports as part of the Application Export. We have included a new select list option on the Export screen within the Application Builder - Export Saved Reports
Specify whether to include Saved Interactive Reports in the application export. This will enable you to export the customized settings of users for all Interactive Reports in the application. Options include:
- Yes includes Saved Reports in the application export.
- No does not include Saved Reports in the application export.
You may well ask why we implemented it as part of the export rather than as a stand-alone utility. The answer is related to the way the IRs are saved and the fact they are tied to the Region_Id for the IR. When an application is imported it retains the same Region_Ids providing the Application ID is the same as when it was exported. If the imported application is given a new Application ID then all the Region_Ids are changed and the saved IRs will not link to the region.
2. Preserving user saved IRs when updating application
This is direclty related to how IRs are saved against a specific Region_Id and how the Region_Id is determined when importing an application. If the Application ID on export and import are the same then the Region_ID will be preserved and any saved IRs will be available. To ensure this select "Install As Application:" option of 'Reuse Application ID xxx From Export File', not 'Auto Assign New Application ID' or 'Change Application ID'.
If the Application ID is changed during the import then new Region_Ids will be defined and none of the previous saved IRs will be shown for the users. To avoid this it is essential that the application id is not changed between environments. The best practice to avoid these sorts of issues is to develop your applications in DEV - Export the application and put into source control. Then only ever build from source control into every other environment and not from exports taken from staging / test / UAT etc. When installing into environments where you want the saved IRs preserved never assign a new Application ID during Import.
3. Sharing user saved IRs between different users
This is a very common request and one which there is no supported solution for.
We plan to investigate this issue as part of our APEX 4.0 development.
The best solution currently is to have the developer create a "default" report layout.
Hope this helps answer most questions on saving IRs