DatabaseTotals (Property)

Applies To:

OLAPQuery object

Description:

Returns database totals when the OLAPQuery is processed.

Action:

Read-write, Boolean

Example 1:

This example shows how to return database totals when the OLAP query is processed:

ActiveDocument.Sections["OLAPQuery"].DatabaseTotals = true

Example 2:

This example shows how to use an if...else statement to show if database totals are active or not. The script is attached to a command button and the message is displayed in a text box:

dbTotals = ActiveDocument.Sections["OLAPQuery"].DatabaseTotals
if (dbTotals )
{
TextBox1.Text = "Database Totals are on"
}
else
{
    TextBox1.Text = "DB Totals are off"
}

Constants:

The DataFunction property uses the BqDataFunction constant group, which consists of these values: