How do I limit export formats?

Expand / Collapse
 

How do I limit export formats?


You can show the bulk csv option and hide the other options byplacing the following in your ConfigureSettings() method in theGlobal.asax (found in the root of the installation director) file.

Removing Options

Use the AdHocSettings.OutputTypes setting to remove output types.The buttons on the toolbar in the report designer will also be removed.

A sample usage is shown below:

//this code removes CSV, excel and word formats from exporting
AdHocSettings.OutputTypes.Remove("csv");
AdHocSettings.OutputTypes.Remove("xls");
AdHocSettings.OutputTypes.Remove("doc");

Adding Options ( e.g bulk csv )

This code will show the bulk csv option export type in the Report Viewer.

//show (unhide) the option for bulk csv
AdHocSettings.OutputTypes["BULKCSV"].Hidden = false;

//hide the option for csv
AdHocSettings.OutputTypes["CSV"].Hidden = true;

String keys for output types

The string keys which are available are:

  • csv
  • pdf
  • doc
  • xls
  • sql
  • bulkcsv
  • xml
  • odt (open office)
  • rtf



Details
Type: FAQ
Options