Sliding controls to remove blank space in a DataWindow object

You can specify that you want to eliminate blank lines or spaces in a DataWindow object by sliding columns and other controls to the left or up if there is blank space. You can use this feature to remove blank lines in mailing labels or to remove extra spaces between fields (such as first and last name).

NoteSlide is used by default in nested reports PowerBuilder uses slide options automatically when you nest a report to ensure that the reports are positioned properly.

StepsTo use sliding columns or controls in a DataWindow object:

  1. Select Properties from the control's pop-up menu and then select the Position tab in the Properties view.

  2. Select the Slide options you want:

    Option

    Description

    Slide Left

    Slide the column or control to the left if there is nothing to the left. Be sure the control does not overlap the control to the left. Sliding left will not work if the controls overlap.

    Slide Up - All Above

    Slide the column or control up if there is nothing in the row above. The row above must be completely empty for the column or control to slide up.

    Slide Up - Directly Above

    Slide the column or control up if there is nothing directly above it in the row above.

These options are also available on PainterBar2.

NoteIf you are sliding columns up Even blank columns have height; if you want columns to slide up, you need to specify as Autosize Height all columns above them that might be blank and that you want to slide other columns up through.

Example

In a mailing label that includes first and last names, as well as address information, you can use sliding to combine the columns appropriately.

In the following label, emp_lname, the comma, state, and zip_code are specified as slide left. Edges are shown to indicate the spacing between the columns. Notice that there is a small amount of space between controls. This space is necessary for Slide Left to work properly:

The sample mailing label shows emp _ f name and emp _ l name on the first line, street on the second line, and city, state, and zip_code on the last line. Edges around each column name indicate that there is space between the columns.

When you preview (run) the DataWindow object, the last name, comma, state, and zip code slide left to remove the blank space:

The sample shows a mailing label with normal spacing.