AddExportSection (Method)

Applies To:

ChartSection, Document object, PivotSection, QuerySection, Section, TableSection

Description:

Exports documents to HTML, that enables you to distribute data to many users using corporate intranets or Web sites. This scripting method:

The resulting file set is a frame-based HTML display that includes a report navigation frame, a report display area, and navigational report hyperlinks

When exporting selected sections, specify the section name in the AddExportSection (Method). You must specify a call to AddExportSection Method) to export a section. After specifying all sections to export, the Document level Export (Method) is called, you use to specify the export file format.

Exported documents preserve the original fixed section order of an Interactive Reporting document file, regardless of the order of the AddExportSection (Method) calls. Invalid AddExportSection (Method) calls, caused by an invalid section type or name, are ignored.

When sections are export, the Export (Method) clears the export buffer. If sections do not export, use the RemoveExportSection (Method) to flush the export buffer and remove sections set for export. For instance, if you specify a Report, Pivot, and Chart section to export using the AddExportSection (Method), a call to the RemoveExportSections (Method) nullifies the section for export. Calls to the Export (Method) assume that you want to export all, instead of individual, sections.

Exported documents reside in the default export directory where the brioqry.exe file resides. You can modify the export directory by specifying a path for the filename argument in the Export() method, such as c:\\temp\\myfile.htm . HTM extensions denote HTML files, as shown in this example:

Documents["MyDocument.bqy"].Export(‘C:\\Temp\\MyExportFile.htm’,BqExportFileHTML)

Note:

You cannot export the Query, OLAPQuery, and DataModel sections.

Syntax:

Expression.AddExportSection(SectionName As String)

Expression Required:

An expression that returns:

Example 1:

This example shows how to export selected sections of Interactive Reporting document file:

//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’)
ActiveDocument.Export(‘C;\\Temp\\MyExportFile.htm’, bqExportFormatHTML)

Example 2:

In this example, selected sections are set to be exported, then cleared from the export buffer. The Export method in the last section of script enables all sections to be exported:

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