I am experiencing issues while trying to add a EntityDataSource to a report:
Method 1:
1) Opened a new VS2010 project of "Class Library"
2) Added a new "Telerik Report Q1 2011" item to the project, and cancelled the Report Wizard
3) Added a new EntityDataSource from the toolbox
a) On the "Choose Your Data Connection" screen, selected "Specifiy a new connection string" and added the following to connect to a simple database on my local installation of SQL 2008: (See attached picture "ConnectionString")
b) Proceed to the "Save the Connection String" page, leaving the "Yes, save this connection string..." checkbox checked, I click "Next" and receive a "blank" VS2010 error. (See attachment "SaveError")
Method 2:
1) I cancel the wizard and remove the EntityDataSource item from the report
2) I add an ADO.NET Entity Model to the project - named "SL_Lab1" to match the database name.
3) I add a blank table "table1" into the body of the report.
4) I switch over to the code view and update the code behind.
5) Previewing the report gives me "The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid."
6) Add in the connection string
6) Build and Preview - same error.
7) Change ConnectionString to:
8) Build and Preview - same error.
I have tried this several times, with different databases and always receive an error. Either the one above or "Unable to load the specified metadata resource".
Any advice on what I am doing wrong?
Method 1:
1) Opened a new VS2010 project of "Class Library"
2) Added a new "Telerik Report Q1 2011" item to the project, and cancelled the Report Wizard
3) Added a new EntityDataSource from the toolbox
a) On the "Choose Your Data Connection" screen, selected "Specifiy a new connection string" and added the following to connect to a simple database on my local installation of SQL 2008: (See attached picture "ConnectionString")
Method 2:
1) I cancel the wizard and remove the EntityDataSource item from the report
2) I add an ADO.NET Entity Model to the project - named "SL_Lab1" to match the database name.
3) I add a blank table "table1" into the body of the report.
4) I switch over to the code view and update the code behind.
namespace EntitySetTest
{
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using Telerik.Reporting;
using Telerik.Reporting.Drawing;
/// <
summary
>
/// Summary description for EntitySetReport.
/// </
summary
>
public partial class EntitySetReport : Telerik.Reporting.Report
{
public EntitySetReport()
{
//
// Required for telerik Reporting designer support
//
InitializeComponent();
Telerik.Reporting.EntityDataSource entityDataSource = new Telerik.Reporting.EntityDataSource();
entityDataSource.ObjectContext = typeof(SL_Lab1Entities);
Telerik.Reporting.Report report = new Telerik.Reporting.Report();
report.DataSource = entityDataSource;
table1.DataSource = entityDataSource;
}
}
}
6) Add in the connection string
entityDataSource.ConnectionString = "SL_Lab1Entites";
7) Change ConnectionString to:
I have tried this several times, with different databases and always receive an error. Either the one above or "Unable to load the specified metadata resource".
Any advice on what I am doing wrong?