Body (Object)

Member of:

ReportSection object

Description:

The Body (Object) represents the attributes that you typically display in report body sections.

Example:

This example illustrates how to spring and unspring a table and chart in the body section:

ActiveDocument.Sections["Report"].Body.Tables["Table"].Spring("Chart")
ActiveDocument.Sections["Report"].Body.Charts["Chart"].UnSpring()

Methods:

None

Properties:

Read-write: KeepTogether as Boolean, KeepWithNext as Boolean, PageBreak as BqPageBreak, Visible as Boolean

Objects/Coll.:

LineFormat, FillFormat object, Tables, Fields, Shapes, Pivots, Chart CategoryItems (Collection)

Member of:

ChartSection object

Description:

Represents items for a Chart axis and maps directly to the Chart outliner.

The CategoryItems (Collection) is instantiated three times in a Chart Section as XCategories, Facts, and ZCategories.

Tip:

All collections have a method named "Item(NameOrIndex)." This is the default method for all collections and returns an item in the collection at a particular index or with a specific name. Use brackets ([]) to represent calls to the Item (Method). For example, these statements are identical: myItem = Documents[1] myItem = Documents.Item(1) myItem = Documents["StartUp.bqy"] myItem = Documents.Item("StartUp.bqy")

Example:

In this example, a chart is built using the request items specified in the query. All items in the outliner are removed; then specific items are added to the outliner:

ActiveDocument.Sections["Chart"].XCategories.RemoveAll()
ActiveDocument.Sections["Chart"].Facts.RemoveAll()
ActiveDocument.Sections["Chart"].XCategories.Add("Year")
ActiveDocument.Sections["Chart"].Facts.Add("Unit Sales")

or

for (I=1;I< ActiveDocument.Sections["Chart"].XCategories.Count; I++)
   ActiveDocument.Sections["Chart"].XCategories.Remove(I)
for (I=1;I< ActiveDocument.Sections["Chart"].Facts.Count; I++)
   ActiveDocument.Sections["Chart"].Facts.Remove(I)
   ActiveDocument.Sections["Chart"].XCategories.Add("Year")
   ActiveDocument.Sections["Chart"].Facts.Add("Unit Sales")

Methods:

Add(ItemName As String), AddComputedItem(Name As String, Expression As String, [optional] Index As Number), Item(Value as NameOrIndex) As AxisItem, Remove(Value NameOrIndex), RemoveAll()

Properties:

Read-only: Property AxisType As BqChartAxisType, Property Count As Number