Showing posts with label rdl. Show all posts
Showing posts with label rdl. Show all posts

Tuesday, March 20, 2012

Pulling reports from Reporting server

I have reports posted to my server and need to edit them. My issue is the original rdl has been "misplaced". I do not have a model built for this server so I cannot use the built in report builder. Is there a way to "download" from the reporting server?Yes. Using Report Manager, If you click on the "properties" of the report and go to the "general" tab, there is an "edit" button right below "Report Definition". This should prompt an edit/save dialog box that will let you download the report if you have the appropriate permissions.

Wednesday, March 7, 2012

Publishing a report programmatically.

Hi!

I have a rdl file and would like to publish it programmatically? Is there any API or Web Service available for this.

Hello Vivekananda:

SQL Server 2005 Reporting Services (SSRS) provides a full-featured set of APIs that you can use to integrate Reporting Services with custom business applications and extend its functionality.

The Report Server Web service provides access to the full functionality of the report server.

A Report Server Web service is an Extensible Markup Language (XML) Web service with a Simple Object Access Protocol (SOAP) API. You can use the Web service to add the functionality of Reporting Services to your business applications.

For more information of the Report Server Web Service:

http://msdn2.microsoft.com/fr-fr/library/ms152787(SQL.90).aspx

ReportingService2005 Class contains the methods and properties that can be used to call the Microsoft SQL Server 2005 Reporting Services (SSRS) Web service.

You can use the method 'ReportingService2005.CreateReport' to create new report to the report server database.

Here is a code example for this:

Code Snippet

class Sample
{
public static void Main()
{
ReportingService2005 rs = new ReportingService2005();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;

Byte[] definition = null;
Warning[] warnings = null;
string name = "MyReport";

try
{
FileStream stream = File.OpenRead("MyReport.rdl");
definition = new Byte[stream.Length];
stream.Read(definition, 0, (int) stream.Length);
stream.Close();
}

catch(IOException e)
{
Console.WriteLine(e.Message);
}

try
{
warnings = rs.CreateReport(name, "/Samples", false, definition, null);

if (warnings != null)
{
foreach (Warning warning in warnings)
{
Console.WriteLine(warning.Message);
}
}

else
Console.WriteLine("Report: {0} created successfully with no warnings", name);
}

catch (SoapException e)
{
Console.WriteLine(e.Detail.InnerXml.ToString());
}

}
}

Hope this helps.

For more information:

Report Server Web Service Features

Report Server Namespace Management Methods

Good luck.

Publishing a report programmatically.

Hi!

I have a rdl file and would like to publish it programmatically? Is there any API or Web Service available for this.

Hello Vivekananda:

SQL Server 2005 Reporting Services (SSRS) provides a full-featured set of APIs that you can use to integrate Reporting Services with custom business applications and extend its functionality.

The Report Server Web service provides access to the full functionality of the report server.

A Report Server Web service is an Extensible Markup Language (XML) Web service with a Simple Object Access Protocol (SOAP) API. You can use the Web service to add the functionality of Reporting Services to your business applications.

For more information of the Report Server Web Service:

http://msdn2.microsoft.com/fr-fr/library/ms152787(SQL.90).aspx

ReportingService2005 Class contains the methods and properties that can be used to call the Microsoft SQL Server 2005 Reporting Services (SSRS) Web service.

You can use the method 'ReportingService2005.CreateReport' to create new report to the report server database.

Here is a code example for this:

Code Snippet

class Sample
{
public static void Main()
{
ReportingService2005 rs = new ReportingService2005();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;

Byte[] definition = null;
Warning[] warnings = null;
string name = "MyReport";

try
{
FileStream stream = File.OpenRead("MyReport.rdl");
definition = new Byte[stream.Length];
stream.Read(definition, 0, (int) stream.Length);
stream.Close();
}

catch(IOException e)
{
Console.WriteLine(e.Message);
}

try
{
warnings = rs.CreateReport(name, "/Samples", false, definition, null);

if (warnings != null)
{
foreach (Warning warning in warnings)
{
Console.WriteLine(warning.Message);
}
}

else
Console.WriteLine("Report: {0} created successfully with no warnings", name);
}

catch (SoapException e)
{
Console.WriteLine(e.Detail.InnerXml.ToString());
}

}
}

Hope this helps.

For more information:

Report Server Web Service Features

Report Server Namespace Management Methods

Good luck.