Telerik report not working
Asked Answered
R

2

-2

An error has occurred while processing Report 'ReportStandart': Unable to establish a connection to the database. Please, verify that your connection string is valid. In case you use a named connection string from the application configuration file, make sure the name is correct and the connection string settings are present in the configuration file of your application. ------------- InnerException ------------- !

Rubefaction answered 6/8, 2014 at 13:14 Comment(4)
You are not giving enough information. It is clear that you cannot establish a connection to the db. But tell us where is your report! Is this error occurring where? Are you in the report designer or in class library? Describe the situation and the environment in which the report is.Tysontyumen
I am using Telerik Report Designer. When Report Viewer Load ,I'm having this error. During the selection of the database, Execute query is successful. In the meantime, I'm using it for the first time.Thank you in advance for your helpImportation
Is the problem happening in the designer?Tysontyumen
No, aspx page loading is happeningImportation
T
1
  • Go to the folder where your report project is.
  • Open the folder and look for the file "Telerik.ReportDesigner.exe.config"
  • Open the file in Visual Studio and copy the connection string
  • Past the above connection string to your web.config

You can find the above here towards the end of the video (3':15'')

Tysontyumen answered 6/8, 2014 at 14:0 Comment(6)
I understand the problem but can not find solutionImportation
Have you tried the connection string as per my answer? What do you get?Tysontyumen
I am Sorry, I've tried them both, but the problem was not resolvedImportation
I have also battled a lot to get this right and I ended up not using the separate tool designer but making the report in class libraries and using connection strings as above described. In this way it did work for me. Good luck! tv.telerik.com/watch/reporting/…Tysontyumen
@MehmetYılmaz, please look at my updated answer. Let me know.Tysontyumen
I solved the problem. I stopped using Telerik. I'm using asp report "ReportViewer1.LocalReport.EnableExternalImages = true;"Importation
G
1

In this sample, we have got sqlDataSource by filling connection string:

MyReport report = new MyReport();
string selectCommand = @"SELECT * FROM Sales.Store";
string connectionString = "Data Source=(local)\\SQLEXPRESS;Initial Catalog=AdventureWorks;Integrated Security=True";
Telerik.Reporting.SqlDataSource sqlDataSource = new Telerik.Reporting.SqlDataSource(connectionString, selectCommand);
report.DataSource = sqlDataSource;

In my case, my start-up project has connection string in its config file so I cannot use the connection string again in another project because of this error:

an error has occurred while processing table 'crosstab 1' ... format of the initialization string does not conform to specification starting at index 0

This error is because of having 1 more connection string.

Maybe this discussion on the Telerik site entitled Set CrossTab DataSource in code-behind will help.

Gestapo answered 29/6, 2020 at 15:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.