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

Background Color doesn’t display in composite DataWindow if using an expression in the detail band – PB Docs 2022 – PowerBuilder Library

Background Color doesn’t display in composite DataWindow if using an expression in the detail band – PB Docs 2022

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.

tr_001.png

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

tr_002.png

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.

tr_003.png

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.

tr_004.png

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

tr_005.png

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

tr_006.png


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