7 Answers, 1 is accepted
You have created a Report Data Source that is in scope only in the report it has been created for. In order to create a Project Data Source component follow the steps:
- From the Project menu select Add -> New Item
- In the Add New Item dialog box, choose a Component Class and click Add.
The new file is added to the project and automatically opened in Visual Studio. - F7 to open the code view
- Change the inheritance of the public partial class to an appropriate Telerik Reporting DataSource component (Telerik.Reporting.EntityDataSource, Telerik.Reporting.SqlDataSource) as shown in the following code snippet:
public partial class Component1 : Telerik.Reporting.EntityDataSource
- Save and rebuild
- Right click the component class -> View Designer
- Click Configure data source
- Follow the wizard
- Save and rebuild
Regards,
Peter
the Telerik team
The steps you outline do not appear to work with a Telerik.Reporting.ObjectDataSource.
I tried following the steps to create a Project Datasource with an Object Data Source as show here:
http://www.telerik.com/help/reporting/data-source-how-to-add-project-data-source.html
An Object Data Source does appear under "Project Datasources" in the Report, however the Object Data Source Wizard displays NO Objects for me to bind the datasource to when I click "Configure Data Source". I have 44 reports to create and would like to create 8 Project Datasources to use in them. We use LINQ functionality to connect to the SQL Server Database and provide the objects we bind the datasource. Object Data Sources created locally to each report do work correctly, just not the Component Classes created to be used as a Project Datasource.
Is this a known issue, is there a workaround ?
We have verified the issue and can confirm that such a problem really exists. The issue is logged in our bug tracking system and will be fixed for the service pack. The SP will be available in a few weeks.
In the meantime you can use the report data source components and copy/paste them between the report definitions.
Your Telerik points have been updated for letting us know about the problem.
Peter
the Telerik team
HAPPY WITH TELERIK REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!
This issue is still there in a freshly downloaded copy of Telerik Reporting 2018 Q2; happeing as descriobed in VS 2017; msiing itmes & crash upon load.
As above I need to share my dataset - tedious to keep re-creating this accross multiple reports.
I wanted to share with others because I found a work around to this problem. If like me you have already created a object datasource within a report and would like to refactor then its fairly easy to identify the designer generated code in the report for the datasource.
I simply copy and pasted the code into the initialize component method of the new datasource class - it looks like this:
// <summary>/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// ReportComparisonLevelsDataSource
//
this.DataMember = "GetReportComparisonLevels";
this.DataSource = typeof(RedxClientCommon.DataSources.ReportEnums.ReportParams);
this.Name = "ReportComparisonLevelsDataSource";
this.Parameters.AddRange(new Telerik.Reporting.ObjectDataSourceParameter[] {
new Telerik.Reporting.ObjectDataSourceParameter("viewenforcement", typeof(bool), "= RedXWeb.Reporting.CMTReportingFunctions.GetUserPermissions()")});
}
I tested and managed to reproduce the problem with Telerik Reporting version 12.2.18.912 and Visual Studio 2017. Indeed, the provided steps to create a Project DataSource with an Object Data Source results to crashing Visual Studio.
Thank you both for reporting the issue - we have logged it in our system for fixing. As a token of gratitude for revealing the problem we have updated your Telerik points.
Regards,
Silviya
Progress Telerik