Followup Question on How to Configure Reporting Services programmatically
This is a followup question to the thread: http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/33ad2907-744e-4da8-bb84-07028dfbaa2f("How to Configure Reporting Services programmatically").That thread was answered, so I'm posting the followup question to a new thread. (If this is incorrect procedure, please let me know) Using the RS WMI provider suggested by James Wu in the other thread, I was able to programmatically complete the following configuration steps from the "Reporting Services Configuration Manager" tool:- Report Server Virtual Directory- Windows Service Identity- Web Service Identity- Database Setup However, I'm not sure how to configure the "SharePoint Integration" step programmatically. Here is what I've been doing to manually configure it: 1. Go to Application Management, Reporting Services section.2. Click on "Manage Integration Settings" andenter the appropriateReportServer URL.3. Set the authentication mode to "Windows Authentication"4. Go back to Reporting Services section and click on "Grant Database Access"5. Enter the server name and specify "Intuition" as the named instance, press OK to confirm. Can you point me in the right direction to programmatically perform the above steps?Thanks!
April 7th, 2009 5:52pm

Daniel,When you setup the database you needed to call the WMI method (GenerateDatabaseCreationScript). The third parameter for this method is a boolean valseu where TRUE means to set up Sharepoint Integration mode (FALSE means native mode).-Dave
Free Windows Admin Tool Kit Click here and download it now
April 10th, 2009 1:44am

Thanks Dave,We were sending in true to the WMI method GenerateDatabaseCreationScript as you mentioned above. However, within SharePoint's Central Administration, you still need to set the ReportServerURL programmatically to complete the integration. In other words, steps 1-3 above. The SharePoint API provides a way to do this.Here is the code we used to do 1-3: string rsServerUrl = @"http://" + computername + @":" + port + "/" + rsVirtualDirectoryName; log.Info("attempting url assignment: " + rsServerUrl); SPFarm farm = SPFarm.Local; SPRSServiceConfiguration configuration = SPFarm.Local.Services.GetValue<SPRSServiceConfiguration>("ReportingService"); if (configuration == null) { configuration = new SPRSServiceConfiguration("ReportingService", SPFarm.Local); } configuration.RSServerUrl = rsServerUrl; configuration.AuthenticationType = RSAuthenticationType.Windows; configuration.Update(); log.Info("Successfully configured Sharepoint Reporting Services URL.");(ps. It turns out we didn't actually need steps 4-5 above.)
April 22nd, 2009 9:04pm

Is there some way to reference the Microsoft.ReportingServices.SharePoint.Common namespace without using the ReportingServices WMI Provider?
Free Windows Admin Tool Kit Click here and download it now
December 8th, 2009 5:18am

We extracted the Microsoft.ReportingServices.SharePoint.Common.dll assembly from the SharePointRS(_x64).msi - added it to the solution in a lib folder and added a reference to the GAC via a direct reference to the dll in the solution. Voila - have access to namespace and code works :)
December 10th, 2009 7:14am

Daniel - can you guess at the code if you had to perform steps 4-5 above?
Free Windows Admin Tool Kit Click here and download it now
December 10th, 2009 7:15am

I think Steps 4-5 are trying to grant database access to the accounts under which the RS services arerunning. So, I would imagine that what you'd have to do is connect to the database using a user that has permission to grant permission and execute some Transact-SQL GRANT commands. Alternately, I think you could use the SQL Server administrative API from the Microsoft.SqlServer.Management.Smo namespace.
December 10th, 2009 6:48pm

For anyone that's still interested in this topic, I'd like to point out that I've posted all our code for configuring RS 2008 programatically inmy original thread: http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/33ad2907-744e-4da8-bb84-07028dfbaa2f
Free Windows Admin Tool Kit Click here and download it now
December 10th, 2009 6:50pm

thanks.. great thread. solved a problem for me.MSDNStudent Knows not much!
March 6th, 2012 11:21am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics