RemoveExportSection (Method)

Applies To:

ChartSection object, DataModelSection object, Document object, DashboardSection object, OLAPQuerySection object, PivotSection object, QuerySection object, Section object, TableSection object

Description:

When sections export, the Export (Method) clears the export buffer. If sections do not export, use this method to flush the export buffer. This removes all sections set to export from the bugger. For instance, if you set a Report, Pivot, and Chart section for export using the AddExportSection (Method), a call to RemoveExportSections (Method) nullifies the export. You could then specify the Export (Method) to export the sections.

Syntax:

Expression.RemoveExportSections()

Example:

In this example sections are set to export using AddExportSection (Method), cleared from the export buffer using RemoveExportSections (Method), and all Interactive Reporting document file sections are exported using Export (Method):

//Export SELECTED Sections of .bqy document
ActiveDocument.AddExportSection(‘Report’)
ActiveDocument.AddExportSection(‘Report2’)
ActiveDocument.AddExportSection(‘Results’)
ActiveDocument.AddExportSection(‘Table’)
ActiveDocument.AddExportSection(‘Pivot’)
ActiveDocument.AddExportSection(‘Pivot2')
ActiveDocument.AddExportSection(‘Pivot3’)
ActiveDocument.AddExportSection(‘Chart’)
ActiveDocument.AddExportSection(’Chart2’)
ActiveDocument.AddExportSection(’OLAPQuery’)
//Flushes the Export buffer
ActiveDocument.RemoveExportSections()
//Export ALL sections of .bqy document since Export buffer was flushed
ActiveDocument.Export(‘C;\\Temp\\MyExportFile.htm’, bqExportFormatHTML)