Support for reports in SDK-style projects.

6 posts, 0 answers
  1. Dmytro
    Dmytro avatar
    4 posts
    Member since:
    May 2014

    Posted 17 Dec 2018 Link to this post

    Hi, 

    sorry if this question have already been asked, but I was not able to find any clear answer.

    Is it possible to have a Telerik Report definition in a new SDK-style project in VS2017?

    I've created a new project "Class Library (.NET Core)" and changed the target framework to 4.6.2

    I've then proceeded to add "Telerik Report R3 2018 (Blank)". The following error message is shown:

    ---------------------------
    Microsoft Visual Studio
    ---------------------------
    The reference "Telerik.Reporting, Version=12.2.18.1129, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" could not be added to the project. This wizard will continue to run, but the resulting project may not build properly.
    ---------------------------
    OK   
    ---------------------------

     

    After pressing 'OK', I have a new report. I'm able to open it with designer, but the designer window is empty.

    Apparently, something is wrong here. Now, the question is if it's me doing something wrong or is it Telerik Reporting not supporting the new project format?

    If the second is the case, are there any plans to support that in the future? We use this new project format all around our solutions and are very happy with it. But we still have to keep Telerik Reports in the old-fashion projects, which causes some friction.

     

    Best regards,

    Dmytro

  2. Silviya
    Admin
    Silviya avatar
    344 posts

    Posted 20 Dec 2018 Link to this post

    Hello Dmytro,

    Currently, Telerik Reporting engine can be integrated only in a .NET Core project that references the full .NET Framework. The Class type reports (i.e. report created with Visual Studio designer as .cs or .vb classes) can be hosted only in .NET projects (ReportLibrary or ClassLibrary).

    Enhanced .NET Core support would be introduced with our next official release R1 2019 scheduled for the middle of January 2019 - What's Coming in 2019.
    Great part of the current functionality should be available for .NET Core under Windows. Some basic functionality is being prepared to run also on Linux machines.

    A possible workaround is creating a Report library project for designing the reports, then put finished CSharp|VB files into .NET Core library. 
    I'm also attaching a sample project that resolve the reports from the Rest Service project (a .NET Core project targeting .NET Full Framework), but it can also be used a .NET Core Class Library project:
    1. REST Service project. In the wwwroot/Reports folder are included the already created reports (I have created ReportBook with two reports in it). Please note that I have changed the namespaces of all reports from ReportLibrary to RestService for consistency.
    2. Html5 Report Viewer in the main application - also .NET Core project targeting .NET Full Framework.I have configured its reportSource.report property to point to the ReportBook.

    Please check the attached application for further reference. In order to run it successfully, you would need to set Multiple startup projects by right clicking on the Solution -> Set StartUp Projects... and choose multiple as https://www.screencast.com/t/t5EqGF1Sxz. Also, please run the Upgrade Wizard in order to upgrade/downgrade the project to the current installed version on the machine.

    I hope it helps, but in case you need further assistance I would be happy to help.


    Regards,
    Silviya
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Dmytro
    Dmytro avatar
    4 posts
    Member since:
    May 2014

    Posted 20 Dec 2018 in reply to Silviya Link to this post

    Hi Silviya,

    thanks a lot for your quick reply.

     

    > Currently, Telerik Reporting engine can be integrated only in a .NET Core project that references the full .NET Framework. 

    This part works for me. 

     

    > The Class type reports (i.e. report created with Visual Studio designer as .cs or .vb classes) can be hosted only in .NET projects (ReportLibrary or ClassLibrary).

     

    This is what does not work as I explained in my initial posting.

     

    >  Enhanced .NET Core support would be introduced with our next official release R1 2019 scheduled for the middle of January 2019 - What's Coming in 2019.

     

    Well, from this roadmap it is not clear when (if) report designer will work in .NET Core projects (that reference the full .NET Framework). Could you please elaborate on this point?

    > A possible workaround is creating a Report library project for designing the reports, then put finished CSharp|VB files into .NET Core library.

     

    Well, i'm afraid that is not a good solution as we have a great deal of reports and we have to change/improve them from time to time. Moving them back and forth is too much effort that can be spent on something more useful :).

     

    > I'm also attaching a sample project that resolve the reports from the Rest Service project (a .NET Core project targeting .NET Full Framework), but it can also be used a .NET Core Class Library project:

     

    Thanks for that. I actually have this part working find in my solution. So, it's not a big help for me. But, thanks anyway.

    By the way, the solution you've attached would not build on my VS2017, event though I have Telerik nuget feed configured (https://nuget.telerik.com/nuget).  This is the output:

    ErrorNU1102Unable to find package Telerik.Reporting.Trial with version (>= 12.2.18.912)
      - Found 7 version(s) in Telerik Reporting [ Nearest version: 12.1.18.824 ]
      - Found 1 version(s) in nuget.org [ Nearest version: 10.0.16.204 ]RestService
    ErrorNU1102Unable to find package Telerik.Reporting.Services.AspNetCore.Trial with version (>= 12.2.18.912)
      - Found 7 version(s) in Telerik Reporting [ Nearest version: 12.1.18.824 ]
      - Found 0 version(s) in nuget.org

    May be I need to use another nuget feed for Trial assemblies? I'm not sure. A small advice here: you can distribute nuget.config with samples like this one, so folks do not have troubles like this one.

     

    Best regards,

    Dmytro.

     

     

  4. Peter
    Admin
    Peter avatar
    1651 posts

    Posted 02 Jan Link to this post

    Hi Dmytro,

    Let me first clarify that we are currently working on support for the Telerik Reporting runtime for pure .NET Core projects. This runtime will only support TRDP report definitions. That can be designed with our full-featured Standalone Report Designer

    Тhe .NET Core projects including the ones referencing the full .NET Framework depend upon the VS new project system, that has some limitations about the design time support. Telerik Reporting VS Report Designer uses some components from the .NET Framework that currently are not supported in the new project system. The same components are used by the Windows Forms Report Designer and currently as elaborated in this GitHub thread - support for design time is still work in progress.

    Thus currently only the following two approaches are available:

    • Create a separate .NET Framework class library for reports and reference it to the ASP.NET Core projects.
    • Try the Standalone Report Designer and use TRDP report definitions.

    We will appreciate if you elaborate on the shortcoming of the suggested approaches so we can further improve the design time experience.

    About the error it seems that the R3 2018 is not yet downloaded from the Telerik download page, and due to this the NuGet packages for this release are not enabled. Still the provided example is very similar to the one provided with the Telerik Reporting installation %programfiles(x86)%\Progress\Telerik Reporting R2 2018\Examples\CSharp

    Regards,

    Peter
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  5. Dmytro
    Dmytro avatar
    4 posts
    Member since:
    May 2014

    Posted 02 Jan in reply to Peter Link to this post

    Hi Peter,

    > Let me first clarify that we are currently working on support for the Telerik Reporting runtime for pure .NET Core projects. This runtime will only support TRDP report definitions. That can be designed with our full-featured Standalone Report Designer. 

     

    The standalone designer only shines when all your logic is some SQL queries. But that's not how we design our apps. We're trying to separate the business-logic (report data generation) from rendering. And then you need all this magic - referencing business logic DLLs from the Designer's config, re-loading the designer when the DLLs change and so on. That's just not acceptable way to work. It's a terrible, slow and painful workflow.

     

    This is the reason we are using the VS designer. It has its own flaws, but in general it is much more pleasant to use. And we are able to clearly separate reports' layout from the code that populates datasets. Heck, this allows us to have different layout for different output format. And it super-easy to call the custom functions. And much more. In our case, there is no question if we should use the VS designer or the Standalone one :)

     

    > The same components are used by the Windows Forms Report Designer and currently as elaborated in this GitHub thread - support for design time is still work in progress.

    Yes, I hear all that should come later this year with .NET Core 3.0/VS2019 release. If that happens and you guys are able to utilize it - your product will rock even more :).

     

    > Create a separate .NET Framework class library for reports and reference it to the ASP.NET Core projects.

    This is how we're doing it these days and it works fine. It's just that we are trying to unify our development environment: use the same project styles (.NET Core), we also want to be prepared to go full .NET Core when 3.0 is out and stable. We think that will give us some advantages in the long run.

     

    So, there is nothing urgent. No terrible bugs, no problems which cannot be worked around. My initial posting was just a question to understand if .NET Core style-projects are already supported or is it me missing something. After your answers, I better understand the current state of things.

     

    PS. If you would ask my opinion, I'd say that having the VS designer support in .NET Core projects is something that is very important in the today's .NET world. Also, being able to render on .NET Core would be a killer feature.

     

    Thanks and best regards,

    Dmytro.

  6. Peter
    Admin
    Peter avatar
    1651 posts

    Posted 07 Jan Link to this post

    Hello Dmytro,

    Thank you for the feedback.

    We will definitely look at the elaborated Standalone Report Designer peculiarities regarding the use of external assemblies, I have logged this in our internal feature tracking system for further research.

    About the VS Report Designer once the .NET Core frameworks starts supporting the needed design time components we will make sure the designer is working when hosted in .NET Core projects.

    Regards,
    Peter
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top