This is a migrated thread and some comments may be shown as answers.
Report Web Preview Error
1 Answer 26 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Sumit asked on 11 Jul 2018, 08:38 AM
Hi Team,

I am developing a report in standalone report designer. I have added a table and a SQL server data source. When I configure the data source and provide a SQL query and click execute in the configure box, the query fetches the data. But when I publish the report to the server and web preview it gives below error-

"An error has occurred while processing Table 'table1':

A network-related or instance-specific error occurred while establishing a 
connection to SQL Server. The server was not found or was not accessible. 
Verify that the instance name is correct and that SQL Server is configured to 
allow remote connections. (provider: TCP Provider, error: 0 - No such host is 
------------- InnerException -------------
No such host is known"

Could you please help?



1 Answer, 1 is accepted

Sort by
Telerik team
answered on 16 Jul 2018, 06:38 AM
Hi Ashwini,

Since the error is occurring in the report viewer, it indicates the report finds its connection string and tries to use it. The error is generated on the attempt for creating a connection object through the connection string, selected ADO.NET data provider and the related ADO.NET classes.
You might check the following settings of the report to verify the connection information:
1. SqlDataSource component's ConnectionString - the string is the name of the connection string that will be searched in the web.config of the Reporting REST service's project;
2. SqlDataSource component's ProviderName - the string is the name of the .NET data provider which should be the same as the provderName attribute of the connection string stored under connectionStrings element.

Verify also:
3. The server address is correct;
4. The provided credentials to allow connection to the database;
5. For any security settings that may prevent connection to the database at the given port.

Most important, check the Reporting REST service's configuration file - it should contain a conectionStrings element with an entry having name attribute the same as the SqlDataSource.ConnectionString property. You will have to ensure the database accepts external connections and the connectionString attribute (in the web.config) provides valid information for connecting the database.

Check the deployed web.config file and test the connection string added in the deployed file. Test connecting to the database with MSSQL Management Studio and the connection string in the deployed configuration file.

If you are changing connection strings at run-time as in Changing the connection string dynamically according to runtime data, debug the code to get the used connection string.

Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question