1. Paul Shue
  2. PowerBuilder
  3. Wednesday, 30 June 2021 21:26 PM UTC

I am using PB10.2.0 and I want to make some row(s) invisible in a datawindow. I have made all the columns invisible and set height of columns to zero; selected autosize for height of detail band and all columns; Set slide up all above for all columns. All of these changes simply hide the columns but I still have an empty row in the detail band. I even tried setting (dw_testing.SetDetailHeight(2, 2, 0)) to hide row 2 but I got a -1 return code. (DataWindow.Processing = 0). I am doing 3 manual insertrows and manually setting data into the columns. The data does not display for row 2 but I get an empty row (in my case row 2 is empty space) Is there a way to do this?  

Accepted Answer
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 30 June 2021 21:39 PM UTC
  2. PowerBuilder
  3. # Permalink

Make sure you save the dw with 0 height in the detail. Autosize height will only shrink the heigth up to the height the detail band has when you save the dw.

 

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Wednesday, 30 June 2021 22:41 PM UTC
  2. PowerBuilder
  3. # 1

The easiest way to do this is to create a computed COLUMN, not a computed field. Set it as number and init to zero.

Your SQL in the SQL AS SYNTAX display looks like this:
.
.
<column_x>,
<column_y>,
0  filter_field,
<column_a>,
.
.
.
Hide this new column or set the width to zero. However you want to NOT display the column.

Set the DW FILTER to be "filter_field = 1".

Whenever you want a row hidden, set the filter_field on that row to 1.

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 30 June 2021 21:32 PM UTC
  2. PowerBuilder
  3. # 2

Hi Paul;

  After your loop of InsertRow() commands ... did you try issuing a GroupCalc() command?

Regards ... Chris

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.