DownloadToResults (Method)

Applies To:

OLAPQuery object

Description:

Enables you to download an OLAPQuery data set to an OLAPResults section within the Interactive Reporting document file. When an OLAPResults section is created, it is refreshed automatically with data from its associated OLAPQuery section at each process of the section. When downloaded, the OLAPQuery section can be integrated with the Chart, Table and reporting sections.

If you expect the query to retrieve a small to medium sized data set, it is recommended that you use the automatic download feature from the OLAP, then Tools, then Options, then Program Options, then OLAP tab, then Auto Generate Results When Processing OLAP Query. If you choose this option, the Results set is not created for the current OLAP query, but only for new OLAP Query sections. Also note that in some circumstances when querying large amounts of data, the automatic creation of an OLAPResults section may result in a slight reduction in the query performance. Using the manual download feature either through the menu command or the DownloadToResults method is the preferred method in this case.

Note:

If you create dependent OLAP sections from an OLAPQuery section without database totals and later attempt to enable the database totals function, the local break totals and grand totals may not accurately reflect the correct totals.

Syntax:

Expression.DownloadToResults() 

Example:

The following script was associated with a OnClick event. When the user clicks a command button, an OLAPResults section is generated and displayed in the Catalog pane:

ActiveDocument.Sections["OLAPQuery"].DownloadToResults()