(CubeQuery) QuerySection object
Makes the CubeQuery data available by way of a table section called OLAPResults. If a section called OLAPResults already exists, the new section will be called OLAPResults2, etc. Only one table section will be created. Second and subsequent invocations of this method activates the table section created the first time this method was called.
Note: | Shared members can be excluded from the OLAP query by way of Query Options, however there are some cases where customers might want to include Shared Members in the query and result set, but not in the totals. If you want to include shared members in the results set, the parent context needs to exist in the query. In other words, if a shared member’s parent does not exist in the query, Download to Results does not recognize that it is a shared member. When downloading to results a query that has a “ragged” member selection, where some parent members are not expanded to details, the warning message appears: “The validity of the flattened results is not guaranteed if the grid is not fully expanded and symmetric. This is necessary for “parent context” of shared members in a results set – shared member parents need to exist in the query in order to determine that they are shared for the results set: |
Note: | The Add method for CubeQuery "download to results" dependent reporting sections (Chart, Pivot, Table, Report) does not accept the CubeQuery "Query" section name as the dependent section argument. This is different from use of the Add method with a relational Query section. With CubeQuery, you must use the downloaded "Results" section as the dependent section argument. |
Expression.DownloadToResults()
This example shows how to download the CubeQuery Section to results:
ActiveDocument.Sections["Query"].DownloadToResults()