Completed
Last Updated: 19 Sep 2022 09:42 by ADMIN
Franz
Created on: 16 Dec 2021 13:48
Type: Feature Request
12
Standalone ReportDesigner targeting .net 6

Problem description:
On ".net Framework" it is a supported scenario that assemblies with datasources and/or functions are loaded into the standalone ReportDesigner. This assemblies are used while designing and later also in the ReportViewer while executing the report. Feature described here https://docs.telerik.com/reporting/standalone-report-designer-extending-configuration

Now that .net 6 is release by MS the same feature is needed there. The problem is that the "standalone ReportDesigner" is targeting ."net framework" which means it can only load assemblies targeting ".net framework" or up to ".net standard 2.0". But that is not sufficient because on ".net standard 2.0" only EntityFrameworkCore3.1 is supported and all newer version (EF Core 6.0) are not.  See here https://docs.telerik.com/reporting/knowledge-base/use-reporting-in-dotnetcore-with-entity-framework-core

So in summary:
It`s not possible to use EF Core 6.0 (and upwards) DataSources in the given "standalone ReportDesigner" because it is targeting .net framework. It`s critical to be able to use the newest EF Core versions as DataSource to not be blocked from upgrading a ".net framework" application to .net 6 where the described feature/scenario is used. I need to use the "standalone ReportDesigner" because it gets shipped with the application to edit the reports individually by the enduser. The "VS ReportDesinger" is going to get the upgrade but this would only be usable as a developer before shipping the application.

Feature request:
Upgrade the "standalone ReportDesigner" to target .net 6.

8 comments
ADMIN
Todor
Posted on: 19 Sep 2022 09:42

Hi Adam,

Thank you for the detailed explanations of the requirement. Currently, we have released the Standalone Report Designer for .NET 6 with most of the functionality of the designer for the .NET Framework - Differences between the .Net and .NET Framework designers' functionality.

I suggest logging the DI requirement as a new feature request. This will let you and other users that want this feature elaborate on it so that our developers have a better idea of what you would like and how it may be implemented.

Regards,
Todor
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Adam
Posted on: 09 Sep 2022 13:05

Or if I'm going about this wrong can you explain the expected way I should be setting up the assembly's objectdatasource services so that I can call to injected data services (which themselves inject httpfactory clients) and eventually make REST calls out to get data?

In previous projects before .core and DI, it wasn't as much of a problem because implementations were all concrete. We are just running into this now because our projects are all moving to .NET6/7 and utilizing the DI framework.

Adam
Posted on: 09 Sep 2022 13:01

Thanks for the update.

As for the DI, report execution binds to a compiled assembly to access the ObjectDataSource component and services. Right now the services have to be parameterless. The report services that are called during execution eventually have to make calls to services (ideally injected) which use a httpfactory (ideally injected) to make the calls out to our report data api. The parameterless constructor makes it hard to have the asp.net core DI system inject the services we need. Right now I think I have to hard code the bindings between the service interfaces and concrete implementations. 

It would be nice if either we could let DI fill in non-parameterless service methods for the reports or somehow have access to the IServiceProvider which I could get services from.

I honestly don't know how it would work. It's different since the report is starting execution on that request pipeline. Similarly to the way you can currently hit asp.net core controller actions from a REST call to start a request pipeline and the controller allows you to put injectable interfaces as parameters in the constructors.

ADMIN
Todor
Posted on: 09 Sep 2022 08:41

Hello Adam,

The pilot version of the Standalone Designer for .NET 6 will try to achieve the functionality already available in the designer for the .NET Framework. The custom assembly registration would happen in the same way, in an XML configuration file as the designer is a .NET 6 WPF application.

Can you elaborate on the requirement for the DI registrations? How would you expect it to work and what problem it is going to solve?

Would you like to be able to access the service container we already use internally in the designer? For example, to access User Functions, ObjectDataSources, etc? Or do you want to have a dedicated container?

Regards,
Todor
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Adam
Posted on: 02 Sep 2022 13:53

Thanks for the update Todor. Good to hear something is in development. When I've asked before I just kept getting the response that there was no plans for this and the web designer should be used instead.

In the current standalone designer it was possible to add some things like appSettings and reference our assembly. Do you know if the .NET 6 standalone designer will allow us to also reference our assembly, use appSettings.json values, execute some startup code like DI registrations and then allow the designer to resolve services from the DI container?

ADMIN
Todor
Posted on: 02 Sep 2022 09:07

Hello Adam,

Thank you for sharing your workaround with our community.

    When it comes to the implementation of the Standalone Designer for .NET Core/5/6, our developers are already working on it. I hope we will manage to deliver it for the upcoming release R3 2022 scheduled for the middle of September 2022.

    Regards,
    Todor
    Progress Telerik

    Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
    Adam
    Posted on: 26 Aug 2022 14:42

    I had the same issues and found a workable solution. Our production app is targeting .NET6. I ended up having to make 3 projects for TelerikReporting. As a note, we are also using ObjectDataSources in our reports and our reportservices in the referenced assembly make REST calls to our APIs to get their data. No direct DB access for reports.

    (1) a .NET6 reporting project that my app would reference. It has:

    • DataSource Components
    • The Report Services that the report executes against (with DataObject and DataObjectMethod annotations

    (2) a .NET Standard 2.0 designer project. It would have a mirror of #1 project items. Currently we have our report services dataservice tied directly to our Mock data service. I haven't spent time trying to get this one working against our REST data services.

    (3) a .NET Standard 2.0 core project that both #1 and #2 share containing report models, constants, data service interfaces, mock data services

    When we compile the designer project (#2), VS does a post build event to copy the bin to a folder in the standalone report designer's installation directory. The designer exe.config references that bin folder and has an assembly reference to our designer assembly there.

    Our reports are stored in the TRDX format (XML based) because we encode the reports to string and store them in our database. When we need to use them for execution or to edit with the report designer they are extracted from the DB. For editing in the standalone designer we convert the string back to bytes and pass back as a trdx file. When editing is done we upload the trdx file and it converts it back to a string and stores it in the DB.

    The one hiccup was that the TRDX contents has a <ClrType /> XML node pointing to the referenced report service and assembly. For report execution this needs to be the .NET6 report service and assembly. For editing in the standalone designer, this needs to be the .NET Standard 2.0 report service and assembly. When we extract the TRDX from the database if used for execution we string replace the ClrType node in the XML with the references for the .NET6 project. If we extract the TRDX from the database for the purpose of downloading as a trdx file for use in the standalone designer then we string replace the ClrType with the .NET Standard 2.0 project references. 

    I still have to do more testing on the execution. I'm not sure if the report executing against the .NET6 project will be able to make use of the DI system for injecting data services and may have to hard code in the data services when DI isn't there to fill in the interfaces.

    Hopefully this helps others running into the same issue. I went forward with this solution because I felt there was a 0% chance Telerik would release a standalone designer built on .NET6+ in the next couple years.

    ADMIN
    Todor
    Posted on: 23 Dec 2021 08:51

    Hi Franz,

    Thank you for the detailed description of the requirement. I agree that it is an absolutely valid feature request.

    In the meantime, you may use the Web Report Designer that can resolve objects from custom assemblies for the ObjectDataSources and User Functions.

    Regards,
    Todor
    Progress Telerik

    Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.