如何通过TextBox更改Web引用URL

时间:2014-08-14 11:48:41

标签: c# reporting-services rdl web-reference reportserver

我正在创建一个项目来下载部署在ReportServer上的所有RDL。

我在Codeproject上找到了这篇文章,它运行正常。 http://www.codeproject.com/Articles/339744/SSRS-Downloading-RDL-Files

现在我要做的是在设计器上添加一个文本框,用户将提供reportserver URL

http://servername/reportserver

我在这里找到了一个相关的问题: How to change Location(Url) of a Web Service and Update Web Reference programmatically?

但是我不能在主题上说明MyApi。

总结一下,我的问题是如何通过用户提供的文本框字段上的URL值更改Web服务的“Web引用URL”

编辑:我正在使用Visual Studio 2012!

1 个答案:

答案 0 :(得分:1)

我对该问题的搜索误导我更改app.config,更改Settings.Designer.cs等。

但解决方法是添加一行。

ssrsWebService.ReportingService2010 rs = new ssrsWebService.ReportingService2010();
rs.Url = ReportServerURLTxt.Text + "/ReportService2010.asmx";

我没有检查报表服务上的可用设置,我感到很蠢。