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

Report Parameters / Object DataSource / Preview

3 Answers 108 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 19 Sep 2013, 09:56 PM
I have a DAL (Data Access Layer) added to my report application.
I access the DAL via ObjectDataSource. This works fine. I can see the properties of the class/etc.

I can create a Report Parameter that binds to the ObjectDataSource and set the DisplayMemeber/ ValueMember Fields (no issues)
When I attempt to view the report in "Preview" the Report Parameter is blank (No Data)

I have unit tests set up to verify that data is coming back and all my tests work.

Also If I put the report in question in a web page the Report Parameter in question will populate perfectly fine.

I would really like to have the "Preview" functionality working correctly.

Can you point me in the right direction to address this issue?

3 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 25 Sep 2013, 08:24 AM
Hello Martin,

Thank you for the provided information. However, we weren't able to reproduce the issue at our end.
That is why it will be best if you open a support ticket and send us a runnable sample project that exhibits the problem, so we can review it locally.
Additionally, please provide additional information on the ObjectDataSource, the data-access layer and whether you are using cascading parameters inside the report. 

Regards, Nasko
Telerik

Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

0
Martin
Top achievements
Rank 1
answered on 02 Oct 2013, 08:31 PM
I am using Cascading parameters in the report.

Those cascading parameters are working with a SQLDataSource.

-Martin
0
Accepted
Nasko
Telerik team
answered on 07 Oct 2013, 02:09 PM
Hello Martin,

Generally, the Visual Studio Report Designer operates inside the Visual Studio application. Thus when previewing a report the report constructor is executed in the context of the Visual Studio application. As described in MSDN, the ConfigurationManager.ConnectionStrings property "gets the ConnectionStringsSection data for the current application's default configuration". In Preview mode, this is devenv.exe.config. However, the SqlDataSource component manages to get the connection strings that are added in the currents project configuration file.
Because you have used a custom data access layer (DAL) to access your database data and your DAL is reading the ConfigurationManager.ConnectionStrings from the report that is previewed you get all connection strings defined in the devenv.exe.config file. In order to avoid the error you have several options:
  • Hard code the ConnectionString.
  • Use the SqlDataSource instead that will handle the ConnectionStrings in the Class Library's app.config no matter it's name.
  • Add the connection strings to the devenv.exe.config [not recommended] 

Regards,
Nasko
Telerik

Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

Tags
General Discussions
Asked by
Martin
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Martin
Top achievements
Rank 1
Share this question
or