This is a migrated thread and some comments may be shown as answers.

Reporting Questions

2 Answers 49 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Aaron
Top achievements
Rank 2
Aaron asked on 20 Jul 2010, 05:46 PM
Hi,

I created a Telerik Report in a class library, as the video tutorial instructed.  I tested it and it works fine.

I added another project, an ASP.NET project to the solution, and added a reference to my class library where the report lives.

I created a page, and put a Telerik ReportViewer control, setting the report to the one I created in the class library.

When I first run it, I get an error saying it cannot map to "\".

I re-ran Visual Studio as Administrator (begrudgingly), and this error dissapeared.  I do, however, get a different error:

An error has occured while processing Report '':
Unable to connect to database.  Please verify that your connection string is valid; in case you use a 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.

I check app.config, as well as Settings.settings, and the connection string is there.  And of course, the fact that the report runs fine when previewed in the class library tells me that something is fishy.

I'm using Visual Studio 2010, and the ASP.NET Development Server.

Thanks.

2 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 22 Jul 2010, 04:19 PM
Hi Aaron,

As explained in the Report Previews But Won't Run forum thread -  in order for the report to connect to the data in your actual application, you must ensure that the same connectionString is present in the web.config file of your web forms application. In your case you have to copy the ConnectionString from the Class Library app.config to the Web Forms web.config.
 
Sincerely yours,
Peter
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Aaron
Top achievements
Rank 2
answered on 22 Jul 2010, 08:15 PM
Yep, that did it.  Nice looking report viewer too. 

Thanks, Peter.

Aaron
Tags
General Discussions
Asked by
Aaron
Top achievements
Rank 2
Answers by
Peter
Telerik team
Aaron
Top achievements
Rank 2
Share this question
or