At work we had to create a quick Document (PDF mode) from a bunch of data provided as spreadsheets for a particular client. This was a quick proof of concept and it was decided to import the data as cubes. We ended up with around 12 cubes from which we created reports, some in grid mode some in graph. From those reports we created the final document.
The problem came when a few weeks later we were asked to create another such document this time not for a particular client but generic using the same data structures but with different values.
Instead of republishing the already existing cubes and modifying the document, which would've been a perfectly fine solution, we decided to create a copy of the original (just in case we were asked to run the original document again for that particular client with new data).
The problem with creating a copy in MSTR is the object dependencies.
The Document has the reports as components and the reports at the same time have the cubes as components. Creating a copy of the document, reports and cubes does not associate the new document with the new objects but it retains the references to the original reports.
To repoint reports to the new cubes and document to the new reports we had to follow this high level steps:
- Republish Cube with new data
- Edit report and point it to the new cube
- Replace Document dependency to the new report
Republish Cube with new data
Using MSTR web we republish each of the cubes with the new generic data. This was fairly straight forward and we did not encounter any problems.
Before we settle with the copy and republish approach we tested creating the cubes from scratch first. Creating new cubes did not go well when repointing the reports to the new cubes. Even when the data structures were the same MSTR complaint that columns that existed int he previous cube were now missing from the new cubes.
Because of a little
quirk with step three "Replace Document dependency to the new report" where the tool only replaces reports in grid mode in order to work around that issue the cubes have to be republished... (
more on this when we get to step three)
Creating a copy of the original and republishing the data worked as expected.
Edit report and point it to the new cube
Using MSTR Desktop, edit the report, select Data -> Intelligent Cube Options -> Point Grid to Intelligent Cube.
Save the report.
Note: If the report contains derived metrics, MSTR will alert you that those metrics are not present in the cube. The message can be ignore, the report will work correctly with the new data.
Replace Document dependency to the new report
To replace the report dependency in the document from the original reports to the newly created ones i used the "Find and Replace" functionality in MSTR desktop.
I first came upon this new functionality thanks to
Bryan's blog (great resource for all things MSTR)
In MSTR desktop select Tools -> Find and Replace
- "Select" - In the "Find and Replace" dialog select "Object Dependencies" as the property to modify. For dependee object we will select the original report we want to modify the reference for (From above we would select RA)
- "Find" - Select here the new Document you want to replace the dependencies for. (From the screenshot above we select "Copy of DA"). Click "Update Summary"
- "Replace with" - Select the new report dependent. (From above we select "Copy of RA")
- Click Replace
Repeat the above steps with all other report dependencies you need to replace.
Note: If you have derived metrics in your report instances in the document, those metrics will have to be added again. After replacing the report dependency the derived metrics disappear from the report instance in the document. This is true for reports added to the document as a copy i have not tested what happens when reports are added as a shortcut.
After completing the above steps you will have a fully independent copy of all your objects
MSTR "Find and Replace" tool only allow to find and replace reports in grid view mode, to replace those reports in graph view mode we had to:
- Edit the report
- Switch to grid view mode
- Save the report
- Find and replace dependency
- Edit the report again
- Switch back to graph
- Save the report
The above steps had to be done for both the original and copy reports. With the copy reports, if the copy reports still point to the original data when switching from graph to grid view mode MSTR tries to run the report but complains that the cube has not been published. To workaround this, republish he cubes before switching the copy reports from graph to grid.