Controlling template editing using Overlays . |
|
Resource libraries and overlays can be used for 2 different purposes.
Note: To edit reports end users need a ReportsAnywhere design license. The normal run-time license does not allow this.
To deal with this situation ReportsAnywhere can split a repository into two parts, one of which is locked (the resource library) and the other holds the modifications and extensions. This way the locked part can be redeployed by the VAR without interfering with their users local changes.The resource library is a normal template set (project file), that can be referenced by dependent template set files. For these dependent projects it supplies reusable report components such as views, templates, styles or named frames.
Items from the library can not be changed in the dependent library. To edit the library items open the library file as a normal template set. The items in the library are shared by all dependent projects, so changing an item in the library will change the reused items in all dependent projects. To prevent this, you can create a copy of the resource and edit that.
When a locked template is edited the original template is tucked away in a backup list and a new template is cloned. This is called an overlay.
You can add one library to a template set. To do this, please go to the file menu and choose Add Resource Library. This will open a file chooser where you can select the library. If the item is grayed out, you already have a library and you can not add another one.
Upon deployment you ship the resource library your application as a normal repository. When an end user wants to change extend the supplied templates he creates a new template set and adds the shipped original as resource library. Now the templates shipped by you (the central templates) will be locked. They can only be edited after they are duplicated. (which happens automatically)
When the overlay setup is created then the overlay file will contain no templates or resources yet. When the end user opens the repository, then all resources are marked as locked with a special icon:
| Unlocked. I.e. an overlay exists. | |
| Locked. Editing it, will create an overlay. |
However if the end user decides to edit a template, then ReportsAnywhere will ask whether the user wants to create an overlay. If the user decides not to create an overlay, then the report design is shown but it can not be changed. If the user decides to create an overlay, then the template is copied into the overlay file. The original (central) template remains unchanged, but is hidden until the overlay is either deleted or renamed.
All other resources used by the template are also copied into the overlay. These resources are styles, views and variables. After that the template can be changed.
When a resource with an overlay is renamed or deleted, then the user is informed, that the original (central) resource is uncovered and is available again. The central resources themselves can not be changed, renamed or deleted.
When a template with an overlay is changed by the VAR and redeployed, then these changes remain hidden by the overlay. They become available when the overlay is deleted or renamed. If the template contains important changes then it is advisable to inform end users of the changes, so that they can update their overlays.