How to create a shared DataSet programmatically in Report Server 2008 using the report server web service?

I would like to know how to create a shared DataSet programmatically in a report server using the report server web service?

I can create folders (using the CreateFolder method), reports (CreateReport), data sources, but the web service does not have a method to create a DataSet.

report creation example:

ReportingService2005 rs = new ReportingService2005();
rs.Credentials  = System.Net.CredentialCache.DefaultCredentials;

FileStream fileStream = File.OpenRead(Path.Combine(folderPath, fileInfo.Name));
byte[] bytes = new byte[fileStream.Length];
int x = fileStream.Read(bytes, 0, bytes.Length);

string reportName = Path.GetFileNameWithoutExtension(fileInfo.Name);
rs.CreateReport(reportName, "/reports", true, bytes, null);

thanks in advance b

+3
source share
1 answer

I found a problem.

The problem was that I used the 2005 wsdl specification. We must use the 2010 specification, which allows you to create datasets using CreateCatalogItem.

http: //localhost/ReportServer_XXX/reportservice2010.asmx? wsdl

ReportingService2010 rs = new ReportingService2010(); ... rs.CreateCatalogItem( "DataSet", reportName, "/DataSets", true, bytes, null, out warnings);

: ReportingService2010

+3

Source: https://habr.com/ru/post/1788087/


All Articles