Remember how I taught you to recreate your Analysis Project? Well, let’s say this time you have a model you deployed to the Reporting Services Server, but you have changed it since then and want the old version back. So how would you recreate the model you have on the server?
First of all, create a new Data Source View in your Analysis Project. It doesn’t have to include all the relevant tables, as you’ll only use it as a shell to build upon. After you’ve finished defining the DSV, save the project. Then, right click the new DSV icon you have in your Solution Explorer and choose “View Code”.
Now, open your Report Server, (the link would usually be something along the lines of: http://ServerName/reportserver/Pages/Folder.aspx
Go to your “models” folder (or wherever you may have chosen to save the model you’re trying to recreate). Click on the relevant model from he ones in the folder. What you see is the XML code that defines that model on the server. Right click the XML code and choose “View Source”. This should export all the text for you to the notepad application. Use CTL + F to search the document for “DataSourceView”. You’ll find it somewhere down the document. Erase everything before the “<DataSourceView”. Click again CTL + F for “DataSourceView” to find the next time that it shows in the document. Erase everything after the relevant “>”. What you have left in your notepad is the definition of the model. Click Ctrl + A to mark all the text in your notepad document, and then Ctrl + C to copy it. Now use Ctrl + A to mark all the text in the code of your project’s DSV and Ctrl + V to paste instead of it, the text for the model on the server. Close the window showing you the source code. You’ll find you have a DSV filled with the relevant tables connected, and all as you have defined on the Report Server!
Be sure that the Data Source on which the DSV is based, also exists in your SSAS project (with the same name and the required access to the tables).