Enable per-report allowed export formats configuration.
Environment
Product Version | 15.1.21.512 |
Product | Progress® Telerik® Reporting |
Rendering Format | All |
Description
As of Progress® Telerik® Reporting R2 2021 (15.1.21.512), you can specify device information settings per particular report as part of its definition, configuring the RuntimeSettings report property.
Besides setting the export parameters for particular extension, it allows hiding it and changing its description when listed to the end-user.
The property in question can be set up from the report designer tools as well as through code.
In case of a report book document, the settings of the first report in the book get respected.
Solution
Set the RuntimeSettings in the Report Designers
Set the RuntimeSettings through code
Report report = new Report()
var pdfSettings = new RenderingSettings() { Name = "PDF" , Visible = false };
// Setting Visible to false of a rendering extension means that that rendering extension will not be visible in the export dropdown
// when the report is displayed in a report viewer.
pdfSettings.Parameters.Add(new Parameter() { Name = "DocumentAuthor", Value = "Dimitar" });
report.RuntimeSettings.Add(pdfSettings);
Notes
When exporting a report programmatically, you may also provide it with specific to the report device information settings.
The respective method takes a HashTable argument representing the desired export parameters for this particular rendering operation: RenderReport.