Technical Articles
Changing an Object and its References in Web Intelligence Report
Introduction:
We would have very often come across Scenarios in our Projects where we need to replace the Existing object with another similar object from the Same Universe.
This would include replacing the objects in the Data Provider Window (Result Objects, Query Filters Panes) and in every blocks, formulas, variables, Sections, Breaks, Rankings and so on.
This would be a time consuming process and take a lot of effort, if done manually by removing the existing object and including the new object in the Data provider and then manually replace the object references in the report. But this can be done in an easier way.
Problem Description and Resolution:
Let us see this case with an example. Let’s consider a report where an object ‘Ops Class (Code)’ is to be replaced with another similar object ‘Ops Subclass’ and the existing object is being used in Query Filters multiple times with values hardcoded like the one below.
Also, consider that the report has many variables like the one below, where this object has been extensively used.
Object Reference in Variables:
And consider this object is also being used in Formulas across the reports.
Object Reference in Formula:
Object Reference in Report:
It would be a manual and time-consuming process to change the object and its references in the Query and in all the places in the Report.
But, this can be accomplished in few minutes by following the below steps.
In the Report, go to Data Access -> Tools -> Change Source and select the Query in which the object needs to be changed.
A ‘Change Source Wizard’ window will pop-up and the ‘Choose an existing data source from the document’ option needs to be selected.
The Universe name corresponding to the Query that has been chosen will be displayed. Click on the Universe name (Same Universe) and click on ‘Next’ and in the subsequent ‘Strategy Selection’ window too, Click on ‘Next’.
Object Mapping:
Choose the new object ‘Ops Subclass’ and click on ‘OK’.
The ‘Object Mapping’ window would now have the new object mapped against the Existing object.
Click on ‘Finish’ and We can see that the existing Object ‘Ops Class (Code)’ in the ‘Result Objects’ Pane and ‘Query Filters’ Pane has been replaced with the new object ‘Ops Subclass’.
Changed Object Reference in Data Provider:
The Query needs to be run and now we can see that the Object References have changed automatically without any manual intervention to the new object (Ops Subclass) in all the places (Formulas, Variables, Breaks, Sections, Ranking, etc) in the Report.
Changed Object Reference in Variables:
Changed Object Reference in Formula:
Changed Object Reference in Report:
Conclusion:
The Object and its references have been changed within few minutes thereby saving a lot of manual work and efforts. Hope this helps you in saving your precious time. Your feedback and comments are appreciated.