Returns database totals when the OLAPQuery is processed.
This example shows how to return database totals when the OLAP query is processed:
ActiveDocument.Sections["OLAPQuery"].DatabaseTotals = true
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" }
The DataFunction property uses the BqDataFunction constant group, which consists of these values:
bqDataFunctionColumnName
bqDataFunctionCountDistinct
bqDataFunctionPercentOfCategory
bqDataFunctionPercentOfColumn
bqDataFunctionPercentOfGrand
bqDataFunctionPercentOfIncrease
bqDataFunctionPercentOfRow
bqDataFunctionSum