Need help in deploying report into Report Server Programatically.

  • Hi Guys,

    I am trying to create a folder in the report server programatically. I have attached the code below the error message. I am able to delete the reports which are already created in the folder manually. I haven't tried creating report on the server. Would u guys tell me why this is happening. ?

    I am getting the following exception:

    {"System.Web.Services.Protocols.SoapException: The property 'Name' is read-only and cannot be modified or deleted. ---> Microsoft.ReportingServices.Diagnostics.Utilities.ReadOnlyPropertyException: The property 'Name' is read-only and cannot be modified or deleted. at Microsoft.ReportingServices.Library.PropertyCollection.EnsurePropertiesWritable() at Microsoft.ReportingServices.Library.CreateItemAction`1.CreateNew(CatalogItem itemToCreate, CatalogItemContext parentContext) at Microsoft.ReportingServices.Library.CreateItemAction`1.PerformActionNow() at Microsoft.ReportingServices.Library.RSSoapAction`1.Execute() at Microsoft.ReportingServices.WebServer.ReportingService2005Impl.CreateFolder(String Folder, String Parent, Property[] Properties) --- End of inner exception stack trace --- at Microsoft.ReportingServices.WebServer.ReportingService2005Impl.CreateFolder(String Folder, String Parent, Property[] Properties) at Microsoft.ReportingServices.WebServer.ReportingServic

    ReportService2005.ReportingService2005 rs = new ReportingService2005();

    rs.Credentials = System.Net.CredentialCache.DefaultCredentials;

    rs.Url = "http://localhost:8057/reportserver/reportservice2005.asmx?wsdl";

    Property name = new Property();

    name.Name = "Name";

    Property Description = new Property();

    Description.Name = "Description";

    Property[] properties = new Property[2];

    properties[0] = name;

    properties[1] = Description;

    try

    {

    rs.CreateFolderCompleted += new CreateFolderCompletedEventHandler(rs_CreateFolderCompleted);

    rs.CreateFolderAsync("Praveen", "/Study", properties);

    }

    catch (Exception ex)

    {

    Console.WriteLine(ex.Message.ToString());

    }

    finally

    {

    Console.WriteLine("Press any key to exit.");

    Console.ReadKey();

    }

  • I found out the problem myself

    We should pass null for the 3rd parameter for the CreateFolderAsync() function.

    Thanks,

    Praveen

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply