Adding additional export filters

The new SharpShooter WebViewer 7.0 version introduces the feature of exporting documents with the help of additional filters. By default the reportViewer can perform the following types of export: html, xps, xlsx,pdf,rtf and excel (xls). From now on it’s possible to add an additional filter, for example, a csv export filter. This can be implemented the following way:

1.       1. Open ServiceClass in designer and the required filter from the toolbox:

Now we have our filter registered.

2. Add the required functionality into the client application. Calling the required type of export can be done as shown in the code below:


if (DocumentLoaded) {
 //here we need to pass the required format to exportTo,
 //which should correspond to the value returned by GetFilterFormat()
 //method of the filter which was added in step 1

The following code fragment should be placed right where you intend to call the export in your code. For example, you can add a button to reportViewer toolBarPanel and call this code upon click event handling.


Add Feedback