1. Sivaprakash BKR
  2. PowerBuilder
  3. Tuesday, 4 June 2019 11:12 AM UTC

Hello,

PB 2017 R3

Need to set Autosize height property for few columns in the header#1 band.   

The output is a bill format, with company name and address at top, few columns in both ends [ left & right side] of the paper.  eg.

**********************************************************************************************

Company Name
Address-Line 1
Address-Line 2
Address-Line3
City-Pincode

Tel: XXXXXXXXXXXXXXXXXXXXXXXX                                                                      GST: 33XXXXXXXXXXX
Mob: 9XXXXXXXXXXXXX                                                                                       Counter 3

Bill No. : WB-33                                                                                                  Vou No. : WB-33
Bill Date : 18/02/2019                                                                                          Type : Cash

Name : 
Mobile :
**********************************************************************************************

All the above details appear in header#1 band.  Here Address-Line1, Address-Line2, Address-Line3 may or may not contain details.  Hence those column heights are made zero, with Autosizeheight property set to true  and also the band autosizeeheight property to true.

But I see the results are overlapping.  Address-Line 1and Address-Line 2 overlaps.  

Similarly in Footer#1 band also, there is one such column to be set with autosize height property [ie it to appear only when there is a non-zero value ].   

How to avoid this overlapping ? Don't want to have empty spaces when no values for such columns.

 

 

Attachments (1)
Michael Kramer Accepted Answer Pending Moderation
  1. Tuesday, 4 June 2019 19:42 PM UTC
  2. PowerBuilder
  3. # 1

Question: Is any of your controls placed "out of band"?
Select an object in DataWindow Painter > Look in Properties > Tab = Position > Property = Layer.
"Foreground" or "Background" instead of "Band" will most definitely wreck havoc to AutoSizeHeight and SlideUp.
Your sliding control may be sliding within band but the overlapping text may be foreground or background.

Also, be careful how you switch between slide up = "all above" or "directly above".

I recently spent almost 2 hours trying to get AutoSizeHeight to work as expected.
Always start simple and add items one at a time - continuously testing - when sliding behaves unexpectedly.

HTH /Michael

Comment
  1. Sivaprakash BKR
  2. Wednesday, 5 June 2019 07:37 AM UTC
Thanks Michael.

Slide up do work perfect. Side effect is that it leaves empty spaces at the end of that band. A big gap between data of two bands is not desirable. That's what I try to fill up.
  1. Helpful
  1. Michael Kramer
  2. Thursday, 6 June 2019 10:18 AM UTC
Ah!

1) Mark the band AutoSizeHeight = true

2) Reduce initial height of band to minimum height (read: So that all static, non-null texts will display but no more)

this should fix your white space issue.
  1. Helpful
There are no comments made yet.
René Ullrich Accepted Answer Pending Moderation
  1. Tuesday, 4 June 2019 11:32 AM UTC
  2. PowerBuilder
  3. # 2

Hi,

Check first if the "Slide Up" property is specified correctly for all objects that have to move if one column high changes.

René

Comment
  1. David Peace (Powersoft)
  2. Tuesday, 4 June 2019 15:05 PM UTC
You can just slide the header up so that it is the minimum height, I'm sure hat has worked for me in the past.
  1. Helpful
  1. Sivaprakash BKR
  2. Wednesday, 5 June 2019 07:34 AM UTC
'Slip up' of columns works perfectly. The issue is it leaves empty spaces at the end of that band. Setting Autosize height property for that band, is also not working, seems autosize height property won't reduce the band height, it seems.



Tried reducing that band height through script. Arriving how much to reduce is another complex issue. Reading the Columns X n height values gives the original X and height values, not after it's re positioning.



Since this calculation is to be done for 3 bands ( DataWindow.Header.1.Height , DataWindow.Trailer.1.Height , Summary ), arriving re-positioned columns height and X position is vital. Couldn't arrive those values, so far.

  1. Helpful
  1. Sivaprakash BKR
  2. Wednesday, 5 June 2019 07:35 AM UTC
David Peace,

I'll try with minimum header height in design mode and see the result.
  1. Helpful
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.