Using Export Methods in Code

SharpShooter Reports allows saving final documents to popular formats. Export filters are used for this purpose. They have overloaded Export functions:

public void Export(Document document, string fileName )
public virtual void Export(Document document, string fileName, bool showDialog)


  • document is a final report, 
  • filename is name of a file in which exported document will be saved, 
  • showDialog sets visibility of the export settings window. 
If the first method is used, dialog window of export filter settings will be shown.

Export to formats which filters are located in the assembly PerpetuumSoft.Reporting, is always available from Report Viewer.

In order to use other export filters it is necessary to connect to the corresponding assembly and create at least one instance of the class of this filter. The simplest way to do it is to add necessary filter to the form. Besides, to manipulate available export filters, developer has access to static method PerpetuumSoft.Reporting.Export.RegisterExportFilter(ExportFilterFactory factory) and static collection PerpetuumSoft.Reporting.Export.ExportFilters.

All formats have standard settings:

  • Page range sets range of exported report pages; 
  • Encoding sets text coding; 
  • Resolution sets images resolution.


Add Feedback