我在本机已经实现了报表,而且没有引用Report WebService也能在程序中运行,但是报表文档要求要先建立认证,再生成报表!不知道为什么?在建立认证时出现一下问题,请帮忙!
在MSDN文档里有这个说明如下:
using System;
using System.Web.Services.Protocols;class Sample
{
   public static void Main()
   {
      ReportingService rs = new ReportingService();
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials;      // Create the property to retrieve.
      Property retrieveProp = new Property();
      retrieveProp.Name = "Description";
      Property[] props = new Property[1];
      props[0] = retrieveProp;      try
      {
         Property[] properties = rs.GetProperties("/Samples/Company Sales", props);         foreach (Property prop in properties)
         {
            // Writes the description to the console.
            Console.WriteLine(prop.Value);
         }
      }      catch ( SoapException e )
      {
         Console.WriteLine( e.Detail.InnerXml.ToString() );
      }
   }
}
它提示错误在以下这句话,是路径的问题:
Property[] properties = rs.GetProperties("/Samples/Company Sales", props);
我的报表是在Http://localhost/reportservice里部署的一个ReportSale表,
请问如何获得这个路径?谢谢!

解决方案 »

  1.   

    The Report's path:
    eg:your report in the folder "Test",and the reportname is "testReport"
    the the path is :
    "/Test/testReport"
      

  2.   

    我表的项目是在C盘ReportSale目录下,请问怎么修改?
      

  3.   

    maybe,you have little knowledge about reporting service.
    you should read more related articles.
    in this occasion:
    you should upload your reports into report server
      

  4.   

    如果可能的话能不能推荐点这方面的书或者文章!最好是有Sample的!