Should reporting be separate from main app

1 Answer 30 Views
.NET Core General Discussions Report Viewer - ASP.NET
Chris
Top achievements
Rank 1
Iron
Iron
Iron
Chris asked on 12 Feb 2025, 03:45 PM | edited on 12 Feb 2025, 03:46 PM

I have a main app (.Net Core) into which I now want to start adding some reporting functionality.

I have watched some of the getting started demos, and am reasonably happy with the actual fundamentals of creating reports, my question is more in regards to how best to structure things in terms of my solution / projects.

My main app is a solution with 4 projects, each representing a layer within the app - Core (plain objects), Data (EF data repository), Logic (business logic) and UI (front end MVC controllers / views etc).

Should I be looking to build a completely separate solution for the reporting, with perhaps a project for data retrieval (JSon) and one for the actual report definitions - is this the recommended best practice - I guess there is also an argument to create the data retrieval completely separate as it's own web service?!

Or should I be keep things more simple and adding reporting into the main app in it's own project.

Obviously I want users of my main app to be able to see and run reports, and also the app will need to be able to produce invoices / purchase orders etc which I will also design as reports.

I am thinking that there may be instances where I may want to refer to reports in another customer facing web app, so in effect could be sharing reports.

Sorry if this is a basic question, I just want to get the fundamentals / foundations right from the off.

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 17 Feb 2025, 02:00 PM

Hi Chris,

Thank you for the shared information about the scenario!

I would suggest adding Reporting to the main application, the MVC application with the controllers, since there will be endpoints accessed by the UI.

I suggest that because if you are going to be using an HTML5 Report Viewer to display the reports, you would have to integrate the Telerik Reporting REST Service into the project.

All web report viewers require this service because the reports are rendered only on the server, and since the web report viewers are client-side widgets, they require a Reporting REST Service. You may have a look at The Communication between the Viewer and the REST Service Explained - Telerik Reporting KB article for more information on the topic.

It is also recommended that the report definitions, the TRDP/TRDX/TRBP files, are stored in the same project as where the Reporting REST Service is located. In fact, since the newest release - Telerik Reporting - Progress® Telerik® Reporting 2025 Q1 (19.0.25.211), by default, we do not allow resolving reports from directories outside the application base path. This restriction can be removed - Configuring the processing Element - Telerik Reporting, but it is not recommended for security reason.

If you wish to share reports between applications, I recommend storing them into the database as XML. The Implementing a Custom ReportSource Resolver Explained with Example - Telerik Reporting article contains an example of how to resolve the XML reports in such a scenario.

Regarding the data sources, we do not impose any limitations here, you may use any of the available data source components depending on what is most convenient for your needs. Still, you may have a look at the Best Practices for Data Retrieval in Telerik Reporting blog post which contains specific suggestions for each data source type.

I hope that the provided information will help. Please let me know if you have any further inquiries.

Regards,
Dimitar
Progress Telerik

Stay tuned by visiting our roadmap and feedback portal pages, enjoy a smooth take-off with our Getting Started resources, or visit the free self-paced technical training at https://learn.telerik.com/.
Chris
Top achievements
Rank 1
Iron
Iron
Iron
commented on 18 Feb 2025, 09:20 AM

Hi Dimitar

Many thanks for your comprehensive reply.

Am I OK to put all of the reporting code into it's own MVC Area to keep some separation in my project?

Dimitar
Telerik team
commented on 18 Feb 2025, 03:43 PM

Hi Chris,

Yes, that shouldn't be an issue. If any problems arise from that, please let me know and I will try to assist as best as I can.

Tags
.NET Core General Discussions Report Viewer - ASP.NET
Asked by
Chris
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Dimitar
Telerik team
Share this question
or