Controlling template editing using Overlays .
In a VAR (Value Added Reseller) situation ReportWeaver is shipped as part of an application with a number of predefined templates. These can be run by the user as they are. However frequently users want to modify these templates or want to add more templates of their own. In this case it must be made sure that the modifications and original templates are kept separate. Otherwise there is the danger that in a new version of the application the modifications are overwritten.
Note: To edit reports end users need a ReportWeaver design license. The normal run-time license does not allow this.
To deal with this situation ReportWeaver can split a repository into two parts, one of which is locked 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.
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.
Please use "Save as overlayable ..." in the file menu of the editor to split the template set into a file for the locked templates and one for the template set. The current template set becomes the locked part and a new empty template set is created. The name of the overlay template set is stored in the deployment header. Therefore the deployment header is also written into a new file.
The wizard will ask for two file names: One for the new deployment header, the other for the overlay file.
Note: Whether a template is locked or can be modified, is not stored in the template itself it is only determined by the header that opens it.
Therefore you need two headers one that is used to edit the central templates if you are designing templates as a VAR and one that is shipped with your application and that is used by a designer that extends your templates.
Graphically the setup looks like this:
Upon deployment you ship the header file with your application. When an end user opens the repository for editing 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 ReportWeaver 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 cahnges, so that they can update their overlays.
|Setting up the template set for deployment||Contents||Schema Evolution|