Rendering extensions for Angular Telerik Report Viewer

1 Answer 162 Views
General Discussions
Ron
Top achievements
Rank 1
Iron
Iron
Ron asked on 13 Dec 2022, 10:00 PM

At present I have Telerik Reporting set up as follows:

Stand-alone reports retrieved for Angular Telerik Report Viewer (client side).

On the server (.Net Core / C#):

A basic ReportController, where all it does is pull a base instance of IReportServiceConfiguration

The ReportServiceConfiguration object is set up in Startup.cs and draws on the ConfigurationHelper method called ResolveConfiguration.

I have pictures attached for each of these methods.

What I need to do is find a way to set up CSV exports with the following rendering settings:

- NonStaticText = true

- NoHeader = false

At present I've done as much research as I can but can't figure out how to insert these as the code doesn't seem to leave any openings for these parameters. I've seen recommendations for using Telerik.Reporting.Processing.RenderingResult with TypeReportSource and HashTable  params but no idea how this gets taken up in the present flow. Additionally the tr-viewer on the Angular side does not accept these parameters. There's a [reportSource] but this only allows for report name and direct parameters which don't take rendering or extension overloads.

Let me know if you have any suggestions as to whether there's a place in this where I can inject the parameters I need.

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 16 Dec 2022, 02:18 PM

Hello Ron,

Thank you for the screenshot and the additional information!

The device info settings can be controlled from two places:

  • the Reporting REST Service project's configuration - when set applicable to all reports rendered on that server
  • the Report Definition Configuration(if set, overrides the values of the service) - when set applicable only to the specific report 

In order to set those settings for all report renders through the configuration file of your project(usually named appsettings.json), you may use the extensions Element which specifies a collection of extension types, for which configuration is applied.

For example:

  "telerikReporting": {
    "extensions": [
      {
        "name": "CSV",
        "description": "CSV Description",
        "parameters": [
          {
            "Name": "NoStaticText",
            "Value": "true"
          }
        ]
      }
    ],
}

If you wish to apply this setting only to a single report, you can instead do it through the report definition file, please refer to the Set report-specific device configuration. - Telerik Reporting KB article for details on that.

Thank you for using Telerik REporting!

Regards,
Dimitar
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/.
Tags
General Discussions
Asked by
Ron
Top achievements
Rank 1
Iron
Iron
Answers by
Dimitar
Telerik team
Share this question
or