Get ReportServer Connection string information using reportingservice.cs
Hi Guys, I was wondering if you could help me with this one: I've a ASP.net C# webpage that is connecting to the reportserver database and bringing through subscription information. this is using the ReportingService.CS class file. What I'm trying to do is run a stored proc against the reportsever database before the above so I can get the OwnerID from the Subsription Table and filter the rs.ListSubscriptions with this OwnerID (instead of pulling all subscriptions through with a null, my site has unique users (Not NT users) so I get thier ID from my sites DB and I want to run a proc that finds the OwnerID in the ReportServer, and then run the ListSubscription with the ownerID from this proc) I'm not able to hard code the location of the Report Server as this my vary, so I was trying to use the ReportingService.cs to give me that information using GetDataSourceContents (Maybe this is the wrong one). However having a problem getting this to work, has anyone tried this before / have an idea how to do this? the code is below that I've been trying, its not working though. DataSource ds; DataSources dataSources = rs.GetItemDataSources("/" + (ConfigurationSettings.AppSettings["ReportFolder"])); dataSources = rs.GetItemDataSources("/" + (ConfigurationSettings.AppSettings["ReportFolder"])); ds = dataSources[0]; DataSourceDefinition dsd = ds as DataSourceDefinition(); if(dsd == null) throw new Exception(); String connectionString = dsd.ConnectString; Many Thanks in advance, Irianna.
March 31st, 2011 6:18am

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

Other recent topics Other recent topics