Background Color doesn’t display in composite DataWindow if using
an expression in the detail band
Symptom
Created a DataWindow that has an expression in the detail band for
changing the background based on the value of a column. It works when in
a regular DataWindow control, but it fails when the DataWindow is used
as a report in a composite DataWindow.
Environment
PowerBuilder
Reproducing the Issue
1. In the DataWindow painter right click on the detail band of
the DataWindow and select properties.
2. Click on the Background tab in the properties and then click
on the Expression icon for Color to bring up the Expression Builder.
The expression below will create a blue background for a false value and
red for a true value.

3. The DataWindow expression works when as a simple DataWindow as
follows.

4. When the same DataWindow is put in as a report in composite
DataWindow the background colors fail to display. The department
DataWindow in the composite that works has a similar expression, but the
expression is in the column and not the detail band.

Cause
The background expression is not working because additional
properties need to be set for both the reports in the composite
DataWindow and each individual DataWindow.
Solution
To resolve the problem do the following:
1. Select each report in the composite DataWindow and select Show
Background in the properties General tab.

2. Select Preview Shows Background on the properties Print
Specifications tab for each individual DataWindow.

3. The DataWindow with the detail band background color
expression now displays as expected.
