I have been searching and reading for the last 4 hours to find any resource to create an objectdatasource for an Asp.net Core application. All the samples use framework 4+. I have three tiers in my application the first layer is the Entity/Model layer the middle tier is the service layer/Business logic layer and the final tier is the Web/UI layer.
I have successfully created a reportviewer that displays an embedded sql with parameters but what I am trying to do is to take an IQueryable<T> from the service layer and populate the report. Is there an example available?
5 Answers, 1 is accepted
Or and Entity Data Source example.
Hi Carlos,
The examples we provide for the ObjectDataSource for .NET Framework are generally valid also for .NET Core/Standard.
If you use .NET Standard 2.0 the Standalone Designer should recognize the custom business objects.
I have attached a sample solution using a Html5 Viewer with REST Service in .NET Core 3.1 project and an ObjectDataSource configured in a .NET Standard 2.0 project.
Regards,
Todor
Progress Telerik
Thank you I will review and get back to you.
Hi MCanitez,
The Standalone Report Designer is built with .NET Framework 4.6. If you would like to resolve the assemblies assigned to ObjectDataSource components in the designer, they should be built either with .NET Framework or with .NET Standard 2.0 - check .NET implementation support. An assembly that is built with .NET Core cannot be resolved by the Standalone designer.
You may read more about the ObjectDataSource component in the linked article.
Note also that you need to register the ObjectDataSource assembly in the configuration file of the project that renders the report - Configuration. In the .NET Core/Standard project, you may use JSON configuration - assemblyReferences Element. For the Standalone designer check Steps on how to add ObjectDataSource in a report designed in the Standalone Designer KB article.
Regards,
Todor
Progress Telerik