尝试连接到报表服务器失败-在ASP.NET中设置URL和路径? [英] The attempt to connect to the report server failed - Setting URL and Path in ASP.NET?

查看:259
本文介绍了尝试连接到报表服务器失败-在ASP.NET中设置URL和路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用ASP.NET Web应用程序连接到Report(rdlc文件).我正在使用VS2010,Report Server是2008版.

I'm trying to connect to a Report (rdlc file) using ASP.NET Web Applications. I'm working with VS2010 and the Report Server is version 2008.

我有以下指向该报告的网址,效果很好:

I have the following URL to the report which works fine:

http://server url/Products/_layouts/ReportServer/RSViewerPage.aspx?rv:RelativeReportUrl=/Products/Dashboards/Product_tool.rdl&Source=Server Url/Products/Dashboards/Forms/AllItems.aspx&DefaultItemOpen=1

当我在浏览器中输入该URL时,它首先要求输入用户名密码.当我登录时,Report就会显示出来.

When i enter that URL in my browser it first asks for a username password. When i log in then the Report shows up just fine.

现在我需要在Report Viewer中显示此报告.所以我在aspx页面上添加了Report Viewer控件.我像这样配置URls:

Now i need to display this report in a Report Viewer. So i added a Report Viewer control to my aspx page. I configured the URls for it like so:

Report Server:** http://server url/Products/_layouts/ReportServer

Report Path:** /Products/Dashboards/Product_tool.rdl

我不确定这是否正确..

I'm not really sure if that is even correct..?

无论如何,在我的PageLoad中,我具有以下代码行:

In any case, in my PageLoad i have the following line of code:

eportViewer1.ServerReport.ReportServerCredentials = new ReportCredentials("myuser", "mypass");

ReposrtCredentials类来自: http://social.msdn.microsoft.com/Forums/en-US/vsreportcontrols/thread/c65abca7-0fdb-40fb-aabe-718f63377a55/(来自Phil)

The ReposrtCredentials class is taken from: http://social.msdn.microsoft.com/Forums/en-US/vsreportcontrols/thread/c65abca7-0fdb-40fb-aabe-718f63377a55/ (from Phil)

现在,当我运行Web应用程序时,出现以下错误:

Now when i run my Web Application i get the following error:

尝试连接到报表服务器失败.检查你的 连接信息,并且报表服务器是兼容的 版本.

The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version.

现在我不确定我提供给Report Viewer的URL是否正确?还是其他问题呢?

Now i'm not sure if the URL i supplied to the Report Viewer is right? Or what the problem else could be.

有人知道吗?.

推荐答案

在配置报告查看器时,请检查您使用的帐户是否具有查看报告的权限,因为您必须拥有使用服务器报告时进行访问. 也查看此链接.他们将为您提供帮助: http://forums.asp.net/t/1562624.aspx/1

When you configure your report viewer,check whether the account you use has permission to view the report because it is necessary that you have access when using server report. Check out this link too. They will be of help : http://forums.asp.net/t/1562624.aspx/1

这篇关于尝试连接到报表服务器失败-在ASP.NET中设置URL和路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆