1. Neil Prichard
  2. InfoMaker
  3. Tuesday, 7 July 2020 16:36 PM UTC

I am trying to figure out how to dynamically adjust the height of an object within info-maker, when i have auto-size on a column which expands the row is there a way to match the size on an object? 

In the example below i am trying to adjust the green background object to the size of the field. 

 

 

i am using Infomaker 2019 Build 2082 

Thanks 

Neil 

John Fauss Accepted Answer Pending Moderation
  1. Friday, 10 July 2020 14:18 PM UTC
  2. InfoMaker
  3. # 1

Neil -

I'm attaching a PBL that contains a DataWindow/Report that illustrates two similar techniques for producing a solid, colored column background with no gaps when another column uses Autosize Height. The data is saved in the report.

This is how it appears in the preview pane of the DW Painter:

Note: In order for this to work, the column DWObjects have to reside in the Detail band. The technique does not work when they reside in another band, such as a Group Header, because of the way the GetRow() DW function works in an expression for an object that resides in a band other than the Detail band.

Here's the expression used in the Height property:

/* This expression determines the height of each row, which can vary because
the "info" field and detail band are both set to autosize height. It is 
CRITICAL that this object's Y-position is Zero in order for the colored
background to be seamless! */

Number(String(Describe("Evaluate('RowHeight()',"+String(GetRow())+")")))

This may not help you in your instance since your columns reside in the Group 1 Header band, but I wanted to show you an alternative that works.

Good luck!

 

Attachments (1)
Comment
There are no comments made yet.
Ronnie Po Accepted Answer Pending Moderation
  1. Thursday, 9 July 2020 17:16 PM UTC
  2. InfoMaker
  3. # 2

Have you tried using the rowheight() DW expression function to specify the height of the colored object?

Comment
  1. John Fauss
  2. Thursday, 9 July 2020 18:22 PM UTC
Great idea, Ronnie. This is what I have used in an Evaluate expression in the test DW I created to investigate this issue on Neil's behalf. The problem in Neil's Report/DW is that the rows that appear to be Detail band rows actually reside in the Group 1 Header band and the GetRow() DW function always returns the row number of the first row in the group'd set of rows, so you can't obtain the height of the row being displayed (unless there is only one row displayed in the group header).
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 8 July 2020 18:07 PM UTC
  2. InfoMaker
  3. # 3

Hi Neil;

   Thank you for the PBL with the test report. I was able to "tweak" it somewhat but it still does not render the repeating rectangle without introducing a fine "gap" on each row no matter what property settings I play with.


Regards ... Chris

Attachments (1)
Comment
  1. John Fauss
  2. Thursday, 9 July 2020 03:30 AM UTC
Chris - I believe the problem with the "fine (i.e., as in 'narrow') gap" is because the rows that are being displayed in what appears to be the Detail band actually reside in the Group 1 Header band. I concur that it does not appear to be possible to eliminate this narrow gap in this instance. Reason unknown. However, in a test DataWindow where the data is presented in the Detail band, I'm able to successfully produce the mint-colored background without any gaps.

If it is important enough to be able to produce the mint-colored background without gaps, I think the only viable option is to revise the query that generates the result set so that data grouping is not needed, maybe by utilizing a stored procedure.

Neil, if that's the direction you want to go, I'll post a reply describing the DW details, with my test case example DW.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 9 July 2020 17:34 PM UTC
Hi John;

I seem to remember a PowerBuilder developer complaining in a previous ticket a year or so ago, about this narrow gap in a DataWindow (which is really the IM "Report" object). That ticket classified the gab issue as a bug from what I can remember. Please open a Support Ticket on this issue as you already have the test case to attach. I think that the DW engine should not be adding an extra few pixels if the green rectangle is at Y position 0 (which ours are).

Please let us know if your "work around" solves the issue for now.

Regards ... Chris
  1. Helpful
  1. John Fauss
  2. Thursday, 9 July 2020 19:11 PM UTC
I agree with you the DW engine should not be adding serrupticious rows of pixels. Frankly, Chris, I'm a little less enthusiastic about opening Support Tickets for DW engine rendering issues than I used to be due to a recent experience.

Upon finding errors in the Z-order rendering involving foreground & background layers. I spent the time to produce and submit a test case that clearly demonstrated the problems. Even though the issues were acknowledged and confirmed, they will not be fixed since testing shows the issues existed in PB 12.6... in other words, because the issues where not caused by Appeon. (*sigh*)

While a possible workaround was suggested (performing a GetFullState/SetFullState) in this particular instance, this is not a feasible solution due to the frequency at which this workaround would need to be performed in real-life conditions where this would need to be done.

Anyway, my point here is: Bugs are bugs, and they should be fixed.... otherwise, why bother reporting them?
  1. Helpful
There are no comments made yet.
Neil Prichard Accepted Answer Pending Moderation
  1. Wednesday, 8 July 2020 15:21 PM UTC
  2. InfoMaker
  3. # 4

Hi Chris, i've attached the datawindow within the pbl here, hopefully that is what you needed, let me know if i'm missing anything, 

Thanks 

Neil 

Attachments (1)
Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 7 July 2020 18:03 PM UTC
  2. InfoMaker
  3. # 5

I think a bigger problem is that it appears 1/2 of the first male is being truncated! smile

What presentation style is being used? Grid? Tabular?

Comment
  1. Neil Prichard
  2. Tuesday, 7 July 2020 21:11 PM UTC
lol thats true, i put a format on it and of course it reverts randomly when i move the field around , love infomaker and its features :D
  1. Helpful
  1. Neil Prichard
  2. Wednesday, 8 July 2020 15:20 PM UTC
And its Freeform presentation style
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 7 July 2020 17:56 PM UTC
  2. InfoMaker
  3. # 6

Hi Neil;

  I am assuming that you are referring to a REPORT vs a FORM? I think that I have an idea about what you are trying to accomplish. If I am correct, you want to have the green background as a "continuous" background colour versus the white breaks that we see in your original post. Is that correct?

Regards ... Chris

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 7 July 2020 20:09 PM UTC
Hmmm ... may have to try a few variations of properties and features for that to advise you further.

Any chance that you can export the Report object in question and attach it's source code to this post - along with some test data?
  1. Helpful
  1. Neil Prichard
  2. Tuesday, 7 July 2020 21:14 PM UTC
is that something that can be done with infomaker only? i do not have powerbuilder unfortunately
  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 7 July 2020 23:42 PM UTC
Hi Neil;

There is a registry hack to expose more of IM's PB features like "object Export". That more of a PIA in your case for just one IM object.

In your case - I would suggest creating a new library (PBL) and then copy the problem DW object to that new PBL. Then Zip & attach the new library to this posting.

Regards ... Chris
  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.