Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Generating group headers – PB Docs 125 – PowerBuilder Library

Generating group headers – PB Docs 125

Generating group headers

To generate the contents of the
header section iteratively for each group in a group DataWindow,
check the Iterate Header for Groups check box, or set the Export.XML.HeadGroups
DataWindow property. This property is on by default.

For example, consider a group DataWindow object that includes the
columns sales_order_id and sales_order_order_date.
The following screenshot shows the template for this DataWindow object:

dwgrp01.gif

The root element in the Header section of the template, Orders,
has a child element, Order. Order has an id attribute whose value
is a control reference to the column sales_order_id.
Order also has a child element, OrderDate, that contains a column
reference to the sales_order_order_date column.
These elements make up the header section that will be iterated
for each group.

The Detail Start element, Item, has an id attribute whose
value is a control reference to the column sales_order_items_line_id.
It also has three child elements that contain column references
to the line items for product ID, quantity, and ship date.

When the DataWindow is exported with the Export.XML.HeadGroups property
on, the order ID and date iterate for each group. The following
XML output shows the first three iterations of the group header:

For DataWindow objects with more than one group, when you generate
a new default template, each group after the first is identified
with a special icon and a check on the pop-up menu next to the Starts
Group Header item.

xgrphdr.gif

When the Iterate Header for Groups check box is selected,
each XML fragment in the header section between a Group Header element
and the next Group Header element or Detail Start element is iterated.

In the template shown in the previous illustration, sales
are grouped by customer ID, then by order ID. The customer group
header has attributes for the customer’s ID and first and
last names. The order group header has attributes for the order
ID and date. The following illustration shows the DataWindow in
the Design view:

xgrphdr2.gif

The following XML output shows the first iteration of the
customer group header and the first and second iterations of the
order group header:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x