日期:2014-05-17 浏览次数:20501 次
using System;
using Microsoft.ReportingServices.Interfaces;
using GetPropertiesSample.ReportService2005;
namespace GetPropertiesSample
{
class Program
{
static void Main(string[] args)
{
ReportingService2005 rs = new ReportingService2005();//怎么这里老是提示找不到,要添加引用???
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
rs.Url = "http://localhost/reportserver/reportservice2005.asmx";
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
{
Property[] returnProperties = rs.GetProperties(
"/Tutorial/Sale Orders", properties);
foreach (Property p in returnProperties)
{
Console.WriteLine(p.Name + ": " + p.Value);
}
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}
}
--建议去c#版块问问
c#
go