简体   繁体   English

SSRS 在报表生成器中连接到 SQL 服务器时出现问题

[英]SSRS Trouble Connecting to a SQL Server in Report Builder

We have a new SSRS 2019 Server.我们有一个新的 SSRS 2019 服务器。 I navigate to the SSRS Report Manager web page, click New and select a Paginated Report which opens Report Builder.我导航到 SSRS 报表管理器 web 页面,单击新建,然后单击 select 分页报表,打开报表生成器。 I can create a Data Source connecting to another MS SQL Server 2016 database successfully - I'm embedding the data source not using a shared one.我可以成功创建连接到另一个 MS SQL Server 2016 数据库的数据源 - 我正在嵌入数据源而不使用共享数据源。 I can create a dataset ( select * from table ) and if I go into the query designer and click the red exclamation point I get results as expected.我可以创建一个数据集( select * from table ),如果我 go 进入查询设计器并单击红色感叹号,我会得到预期的结果。 I add a table to the report, add some of the fields from the query and when I run it I get the error:我在报告中添加了一个表,从查询中添加了一些字段,当我运行它时,我得到了错误:

Cannot create a connection to the data source.无法创建到数据源的连接。

In the lower left of Report Builder it tells me what report server I'm currently connected to and if I disconnect THEN run it again it works fine.在报表生成器的左下角,它告诉我当前连接到哪个报表服务器,如果我断开连接然后再次运行它,它工作正常。

Any suggestions?有什么建议么? I'm positive it's something to do with our new report server but I'm confused why I can connect and run the query in the query designer but it won't connect just running the report.我很肯定这与我们的新报表服务器有关,但我很困惑为什么我可以在查询设计器中连接并运行查询,但它不会仅连接运行报表。 Thanks much!非常感谢!

The connection is working from the machine you are designing on, but not from the Report Server.连接在您正在设计的机器上工作,但不是来自报表服务器。 When Report Builder is connected to the server, it tries running the report using the server version of the connection which is why you get this behavior.当报表生成器连接到服务器时,它会尝试使用连接的服务器版本运行报表,这就是您得到此行为的原因。

If you look closely, there are two different Test Connection buttons.如果您仔细观察,会发现有两个不同的Test Connection按钮。 One in the Connection Properties and one in the Data Source Properties .一个在Connection Properties中,一个在Data Source Properties中。 One of these works, but the other won't (if you are connected to the Report Server).其中一个工作,但另一个不会(如果您连接到报表服务器)。

So it comes down to standard connection troubleshooting on the server: check firewalls, drivers, etc.所以归结为服务器上的标准连接故障排除:检查防火墙、驱动程序等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM