1. Raman Dhillon
  2. PowerBuilder
  3. Monday, 23 October 2023 19:51 PM UTC

Is there a function in datawindow that I can use to remove header (title and other objects) but leave the column headers intact?  I tried adjusting header height but it leave the space from the top not the bottom of the header bar.  I need to change this property dynamically before saving to the file (using DW2XLS) and adjusting back to original condition after that.  DW2XLS don't have property to do so as well.

I have attached picture to help with visualization of my ask.  Thanks in advance for your help.

Attachments (1)
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Monday, 23 October 2023 20:28 PM UTC
  2. PowerBuilder
  3. # 1

Hi,

You can use Modify() to adjust the height of your header band and make object visible/invisible. You'd have to move your column labels up. When finished use modify() again to change things back to the way they were.

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 23 October 2023 23:36 PM UTC
  2. PowerBuilder
  3. # 2

Hi Raman;

  I normally use an expression on the "header band" that sets the height to zero on a condition. Like for example Page No < 1. Later on in the DWO, you could set the header height < 0 and the header objects would be visible again with no need to control the objects within the header band.

HTH

Regards... Chris

Comment
  1. Miguel Leeuwe
  2. Tuesday, 24 October 2023 09:57 AM UTC
Hi Chris,

Setting the header height to 0 would hide everything in the header, including the column labels.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 24 October 2023 17:28 PM UTC
Hi Miguel;

I would also use a GROUP based DWO style there as well so that the column headers are in the "Group Header Band". That way, when the main Header Band height is Zero - the column headers are still visible in the "Group Header". I think that this would satisfy Raman's request. ;-)

Regads ... Chris
  1. Helpful 2
  1. Miguel Leeuwe
  2. Wednesday, 25 October 2023 10:10 AM UTC
Ha, that would be a solution yes!
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 24 October 2023 01:33 AM UTC
  2. PowerBuilder
  3. # 3

Hi. Raman - 

Another alternative might be to have a second version of the same grid datawindow that is visually configured the way you want the information to be saved using the DW2XLS utility, then use the ShareData method to shared the data buffers between the actual DataWindow and a DataStore. After saving, turn off the sharing of the data buffers with the ShareDataOff method. This has the advantage of not requiring any dynamic changes to the "real" DataWindow.

Best regards, John

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.