问题描述
我在VS2012中创建了一个带有reportviewer控件的WindowsForm项目。在创建项目期间,定义了连接字符串(例如ServerNmae.myDatabase)。编译项目并创建projectName.exe.config文件,其内容如下。
< configuration>
< configsections>
< connectionstrings>
< add name =ServerName.Properties.Settings。 myDatabaseConnectionString>
connectionString =Data Source = SERVERNAME; Initial Catalog = mydatabase; Integrated Security = True
providerName =System.Data.SqlClient/>
< startup>
< supportedruntime version =v4.0sku =。NETFramework,Version = v4.5>
效果很好。现在我想要使用此应用程序并在包含相同数据库(例如mydatabase)的其他服务器中运行它。这可以通过编辑数据源SERVERNAME来完成吗?
这是我到目前为止所做的,但报告没有填充。所以我需要知道它是否应该工作或解决其他问题。
I have created a WindowsForm project with reportviewer control in VS2012. During the creation of the project, the connection string was defined (e.g. ServerNmae.myDatabase). the project is compiled and a projectName.exe.config file is also created with contents as follows.
<configuration>
<configsections>
<connectionstrings>
<add name="ServerName.Properties.Settings.myDatabaseConnectionString">
connectionString="Data Source=SERVERNAME;Initial Catalog=mydatabase;Integrated Security=True"
providerName="System.Data.SqlClient" />
<startup>
<supportedruntime version="v4.0" sku=".NETFramework,Version=v4.5">
Works great. now I want to take this application and run it in a different server that contains the same database (e.g. mydatabase). Can this be done just by editing the Data source SERVERNAME?
That is what I have done so far but the report does not get populated. so I need to know if it should work or troubleshoot something else.
推荐答案
这篇关于报告应用程序在不同的报表服务器中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!