This is a migrated thread and some comments may be shown as answers.

Limit reporting export formats?

27 Answers 1070 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
edgebyte
Top achievements
Rank 1
edgebyte asked on 14 May 2007, 02:32 PM
Hi

In the web report viewer, I'd ideally like to limit the user to being to export to PDF, and remove .tiff and .mht export functionality. Ideally as well there'd be no drop down list with the formats in - just an export button.

I suspect I'm going to have to write this functionality myself (as I can remove the export stuff from the report viewer, and I can generate the PDF from a raw Report object into a byte array, and hence send it to the client) - but before I implement that I wanted to check if it was built in.

Thanks

Tom    

27 Answers, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 14 May 2007, 04:38 PM
Hi Tom,

Part of this functionality exists in Telerik Reporting but it is not available as part of the report API at this time as we are still working on this feature. We think that we will be able to include it in v2 of the Reporting tool which is several months away.

Sorry for the inconvenience. Let us know if we can be of further assistance.
 

All the best,
Ivan
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Joel
Top achievements
Rank 2
answered on 24 Sep 2007, 08:25 PM
Has this ability been added in the Q2 release?  I need to remove the .csv option from the export dropdown as it does not export the design view of the page, but rather the raw dataset.
0
Svetoslav
Telerik team
answered on 25 Sep 2007, 07:46 AM
Hello Joel,

To our great regret we've postponed this feature for the next version (due at the end of the year). Our plans are to enable you to configure the available rendering formats through the application config file and this way to overwrite the default settings. Up until now there is no possible workarround to disable one or more of the formats.
 

Greetings,
Svetoslav
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Robert Hall
Top achievements
Rank 1
answered on 17 Jul 2008, 11:26 PM
Has this functionality been implemented yet? I would like to disable the csv and xls formats, but keep the rest.
0
Milen
Telerik team
answered on 18 Jul 2008, 07:38 AM
Hi Robert Hall,

I am happy to tell you that this functionality is already implemented. It is available since Q3 2007 version of the product. Information how to configure the rendering extensions you can find in the help article Configuring Telerik Reporting, and a full list of the available settings you can find in the article Device Information Settings.

In your case you just need to hide some of the extensions, so you can use the following snippet in your configuration file.

<Telerik.Reporting>
   
<Extensions>
     
<Render>
       
<Extension name="XLS" visible=”false”>
       <Extension name="CSV" visible=”false”>
       </Extension>
     
</Render>
   
</Extensions>
 
</Telerik.Reporting>

Note: Do not forget to register the Telerik.Reporting section in the <configSections> using the version of the Telerik Reporting product you have.

Regards,
Milen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Jun
Top achievements
Rank 1
answered on 12 Nov 2008, 02:00 PM
I think this setting is globally applied to all telerik.reporting reports. But what if some reports need to be exported to PDF and TIFF and
some are in PDF and RTF only?

There should be a way to limit the export formats for a single telerik.reporting report.

Any ideas?
0
Steve
Telerik team
answered on 12 Nov 2008, 04:02 PM
Hi bembol,

Currently the setting is applied on application level and per report instance settings are not available. If you really need this functionality, and you have those reports loaded on ReportViewers on separate pages, you can use Custom Toolbar.

Regards,
Steve
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Galina Grimberg
Top achievements
Rank 1
answered on 12 Jun 2009, 05:19 PM

Where exactly in web.config file I need to add this code

 

  <Telerik.Reporting>

    <Extensions>

      <Render>

        <Extension name="PDF" visible="true"/>

          <Extension name="CSV" visible="true">

          </Extension>

        </Render>

    </Extensions>

  </Telerik.Reporting>

I got an error, plus I’m using 1q 2009 Telerik reporting and I can’t figure out how to remove some export option, because I only need pdf and csv

Unrecognized element.

Source Error:

 
Line 5:  
Line 6:  
Line 7:      <Telerik.Reporting>
Line 8:        <Extensions>
Line 9:          <Render>

Thank you.
Galina
0
Steve
Telerik team
answered on 15 Jun 2009, 07:14 AM
Hi Galina,

First note that these settings are only needed when you want to hide a specific format. All formats are visible by default so it makes no sense to explicitly add visible=true settings. If you only need pdf and csv then you should set the other formats to visible false.
I've attached a sample web.config file that shows how this is implemented, also this information is available in our help documentation:

You would have to change the version of the assemblies depending on which Telerik Reporting version you use.

Greetings,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Galina Grimberg
Top achievements
Rank 1
answered on 15 Jun 2009, 12:02 PM
Steve,
thanks so much for your help.
Works great!
0
Gregg
Top achievements
Rank 1
answered on 04 Aug 2009, 09:54 PM

I'm encountering a configuration error when trying to include the same sections in my web.config file. I'm using Q2 2009.  I made sure the Telerik.Reporting dll is being copied to my bin folder. Also I seem to be following the instructions in the forums as well as in the documentation "Configuring Telerik Reporting Config Section" http://www.telerik.com/help/reporting/configuring-telerik-reporting.html. The error seems related to Telerik.Reporting.Processing. Does that exist as a separate dll? I can find no such dll. What am I doing wrong?
-------------------------------------------

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: An error occurred creating the configuration section handler for Telerik.Reporting: Could not load file or assembly 'Telerik.Reporting.Processing, Version=3.1.9.701, Culture=neutral, PublicKeyToken=a9d7983dfcc261be' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 2:  <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
Line 3:    <configSections>
Line 4: <section name="Telerik.Reporting"Line 5:           type="Telerik.Reporting.Processing.Config.ReportingConfigurationSection, Telerik.Reporting.Processing, Version=3.1.9.701, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE"
Line 6:           allowLocation="true"

0
Steve
Telerik team
answered on 13 Aug 2009, 12:17 PM
Hello Gregg,

Indeed in Q2 2009 we've reduced the number of assemblies required by Telerik Reporting runtime to 3:
  • Telerik.Reporting - the reporting engine APIs and runtime
  • Telerik.ReportViewer.WinForms - the Windows Forms report viewer control
  • Telerik.ReportViewer.WebForms - the ASP.NET report viewer control
The processing and interfaces namespaces are now part of Telerik.Reporting assembly. You can review this KB article ( Limit export options in ReportViewer to certain format only) that is updated to use the new version of the product and contains sample web and app config files.

Greetings,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Otto Neff
Top achievements
Rank 2
answered on 17 Jan 2013, 09:10 AM
Hi, 
is there still only the possibility to config the export formats on application level?
I've different reports in different report viewer where I only want to have certain export formats

Crrently I'm using this little js hack, after ReportBind with ClientID on RadButtonClick with RadAjaxManager ResponseScript:


                function RemoveExportFormats(obj) {
                    // DIRTY JS REMOVE HACK -> TELERIK REPORTING ONLY SUPPORTS EXPORT FORMAT CONFIGURATION ON APPLICATION LEVEL
                    $($("#" + obj + "_ReportToolbar_ExportGr_FormatList").children()[0]).find("option[value='MHTML']").remove();
                    $($("#" + obj + "_ReportToolbar_ExportGr_FormatList").children()[0]).find("option[value='XPS']").remove();
                    $($("#" + obj + "_ReportToolbar_ExportGr_FormatList").children()[0]).find("option[value='XLS']").remove();
                    $($("#" + obj + "_ReportToolbar_ExportGr_FormatList").children()[0]).find("option[value='CSV']").remove();
                    $($("#" + obj + "_ReportToolbar_ExportGr_FormatList").children()[0]).find("option[value='RTF']").remove();
                    $($("#" + obj + "_ReportToolbar_ExportGr_FormatList").children()[0]).find("option[value='IMAGE']").remove();
                }

but I would prefer to configure it in the markup like eg. this:


<reporting:ReportViewer ID="TelerikReportViewer" runat="server" Style="border: 1px solid #ccc;" Width="820px" Height="580px">                                            
<ExportFormats>
<ExportFormat Value="PDF">
<ExportFormat Value="XLSX">
</ExportFormats>
</reporting:ReportViewer>
0
Stef
Telerik team
answered on 22 Jan 2013, 02:34 PM
Hello Otto,

You're correct, currently the settings are placed in the application configuration file and are applied for all Report Viewers in your application. Your js based workaround is the correct one when you need to hide certain export options for the time being.

Kind regards,
Stef
the Telerik team

HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

0
srilal
Top achievements
Rank 1
answered on 30 Jan 2013, 07:46 PM
Hello,

If I want to change the export settings globally for the application where can I find the application configuration file for telerik reporting and how I would change it.

Srilal
Thanks
0
Stef
Telerik team
answered on 04 Feb 2013, 01:43 PM
Hello Srilal,

The following help articles explain how to modify the configuration file of your application:

In general, your configuration file should look as follows for all export options that are going to be hidden:

<configuration>
  <configSections>
    <section name="Telerik.Reporting" type="Telerik.Reporting.Configuration.ReportingConfigurationSection, Telerik.Reporting, Version=x.x.x.x, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" allowLocation="true" allowDefinition="Everywhere" />
  </configSections>
  <Telerik.Reporting>
    <Extensions>
      <Render>
        <Extension name="CSV" visible="false">
        </Extension>
      </Render>
    </Extensions>
  </Telerik.Reporting>
I hope this helps.

All the best,
Stef
the Telerik team

HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

0
TRA
Top achievements
Rank 1
answered on 07 Jun 2013, 07:39 PM
Hey guys.  Do you have any plans to limit the export formats on the report level?  Our customers have really been asking for that kind of flexibility.  It would also be great to be able to limit export formats based on user level.  Thanks for all you do.
0
Stef
Telerik team
answered on 12 Jun 2013, 12:56 PM
Hello,

Such feature is not planned yet, so please use the provided settings which can be applied in the application configuration file or the approaches described by other community members.

We appreciate your vote for having programmatic control mechanism over the displayed export options. In short we do not have plans to add such functionality to Telerik Reporting, as there are many other features that we need cover in order to provide you with a fully functional reporting engine.

Regards,
Stef
Telerik

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

0
Joel
Top achievements
Rank 2
answered on 12 Jun 2013, 01:30 PM
I just wanted to provide feedback that this is the #1 complaint of our customers when it comes to Telerik reporting, and that status has stayed the same for several years.  They want this report as xls only, this one as an image, this one as a pdf etc.  Most everything else they have requested we can already provide.

0
Patricia
Top achievements
Rank 1
answered on 16 Jul 2014, 10:16 AM
Hello,

Has this functionality been implemented yet?

Thanks,

Patricia
0
Stef
Telerik team
answered on 18 Jul 2014, 03:53 PM
Hello Patricia,

If you use the ASP.NET ReportViewer, you can use a custom toolbar and provide your own export options list, where the export is handled programmatically.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Yasmeen
Top achievements
Rank 1
answered on 04 Sep 2015, 12:45 PM
Did we limit the Telerik export formats on the report level? Our customer want to limit one report in pdf format and one to xls format.Can you suggest me how it is possible? Is this applicable only to application level
0
Otto Neff
Top achievements
Rank 2
answered on 07 Sep 2015, 06:48 AM
Hi Yasmeen,

yes currently the only supported way is on application level.
Everything else is some kind of a little hack. You can vote for the feature here:

http://feedback.telerik.com/Project/162/Feedback/Details/168188-export-formats

Kind regards.
0
Christhian
Top achievements
Rank 1
answered on 16 Jun 2016, 03:03 PM

After searching for a few hours in the forums , trying with some of the methods that give to this problem

In the latest version of Telerik , I found the following form to remove the formats that did not require , in ReportsController , only to do an override of the method GetDocumentFormats

[ActionName("Formats")]
public override HttpResponseMessage GetDocumentFormats()
{
    IList<ExtensionInfo> formats;
    base.GetDocumentFormats().TryGetContentValue(out formats);
 
    formats.Remove(formats.Where(x => x.Name == "RTF").FirstOrDefault());
    formats.Remove(formats.Where(x => x.Name == "MHTML").FirstOrDefault());
    formats.Remove(formats.Where(x => x.Name == "IMAGE").FirstOrDefault());
    formats.Remove(formats.Where(x => x.Name == "XPS").FirstOrDefault());
 
    return Request.CreateResponse(HttpStatusCode.OK, formats);
}

0
Stef
Telerik team
answered on 17 Jun 2016, 08:23 AM
Hi Christhian,

This is a valid approach for limiting the export options.

You can also use Javascript and CSS to hide elements from the HTML5 viewer's toolbar or add such. The viewer's API is exposed and you can provide entirely custom UI as well - data attributes and commands.

Regards,
Stef
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
0
Rob
Top achievements
Rank 1
answered on 15 Mar 2021, 10:31 PM

Has there been an update since these messages were posted? 

 

I've tried overriding the HttpResponseMessage GetDocumentFormats(), but that just resulted in a bad menu.  I've tried using Javascript to hide the menus in the RenderingEnd function, but something seems to be messed up with that as well.

Thanks!

0
Neli
Telerik team
answered on 18 Mar 2021, 01:38 PM

Hi Rob,

The implementation of the feature has already started and we are expecting it for R2 2021 which is scheduled for the middle of May. You can vote for the Export Formats feature request, so when there is an update on the status, you will get a notification.

Regards,
Neli
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
edgebyte
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Joel
Top achievements
Rank 2
Svetoslav
Telerik team
Robert Hall
Top achievements
Rank 1
Milen
Telerik team
Jun
Top achievements
Rank 1
Steve
Telerik team
Galina Grimberg
Top achievements
Rank 1
Gregg
Top achievements
Rank 1
Otto Neff
Top achievements
Rank 2
Stef
Telerik team
srilal
Top achievements
Rank 1
TRA
Top achievements
Rank 1
Patricia
Top achievements
Rank 1
Yasmeen
Top achievements
Rank 1
Christhian
Top achievements
Rank 1
Rob
Top achievements
Rank 1
Neli
Telerik team
Share this question
or