1. Frank Zettanucci
  2. PowerBuilder
  3. Tuesday, 6 December 2022 15:06 PM UTC

I have built a NUP 7 Datawindow SQL Server Select with a TOP 42 custom select statement to always return only 42 results.

At first, I removed all of the columns on the freeform styled NUP and added 7 computed items each with a custom BITMAP call to display 1 of 3 possible images in the 42 tiles based on data results returned.

Then in the mouse event I was planning to mouse over and then change the hovered on column "cell" so we could force the computed logic to change the image dynamically cell by cell.  Yeah, didn't work out.

Appears that for NUP datawindows you cannot reference any 'peripheral' objects dropped on the datawindow to a specific row,

only actual database column objects will be detectable in datawindow event scripts using dwo.row because I guess technically their not part of a row result set, so that went out the window.

Is there a way to do this another way I dont know....

PB Devs : I wish we could have a separate property available to any object that can be dropped on a NUP datawindow that could be manually set.

The property would be numeric, and attach that object to a specific 'row' in the NUP which could be set by the properties screen somewhere or in script.

This would let me assign a bunch of different objects that should be attached to row 1 or row 5 of 42 as if they were 'row 1' or 'row 5' objects.

So that for example in pbm_dwnmousemove event the dwo.row during a mouse over on that peripheral non-database column object would return that special value row #.

To ensure original datawindows returned the original value, if this value is not set or is 0 pb could return the original number using the original dw logic. (IE: Returning the row # the peripheral object was placed on not the actual row # of the database)

 

Frank Zettanucci Accepted Answer Pending Moderation
  1. Friday, 23 December 2022 18:42 PM UTC
  2. PowerBuilder
  3. # 1

After considerable playing around I use a dummy computed column and position its layer to the top most layer of all the objects, set as transparent,

then when in mouse event the script detects the computed column as a real column and i can drive off of that,

works well enough but still don't like the monkey business hack and slash

thanks for the ideas guys.

Frank

 

 

Comment
There are no comments made yet.
Brad Mettee Accepted Answer Pending Moderation
  1. Wednesday, 7 December 2022 16:07 PM UTC
  2. PowerBuilder
  3. # 2

Have you considered making the image compute a database column? That way you can reference a row number from the image "column" object.

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 7 December 2022 03:00 AM UTC
  2. PowerBuilder
  3. # 3

Hi, Frank -

You may have to resort to simulating the desired N-up style in a Freeform DataWindow.

If I were doing this, I would try to simulate the look of the seven N-up instances by having the SQL SELECT statement supply the (7 x 6 = 42) data values in a single row using a Freeform style DataWindow. Each of the 42 column DWObjects would then have its own, unique name. You can then arrange each set of six column objects (or computed field based on the column objects) that simulates the layout/look of the N-up version.

Maybe this will work for you?

Best regards, John

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 6 December 2022 21:53 PM UTC
  2. PowerBuilder
  3. # 4

Hi Frank;

  FYI: There are two types of N-Up DataWindows. The N-UP DWO style and then there is a Tabular DWO where the N-UP feature is turned on in the Print properties (thus only visible in Print Preview mode). Both of these look like an N-UP presentation layout to the App user but are technically quite different "under the hood" implementation wise. Also, the 1st option displays the data sorted vertically and the 2nd style presents the data sorted horizontally.

  In either case, the DWO's presentation layer is drawn much different that what is running internally within the DWO's primary buffer row wise. This makes row & column processing very hard (maybe even impossible) to decipher or control via PowerScript. I have certainly never had to implement this design / coding approach.

  I wonder instead, if you can detail the requirement for such an approach. Maybe we can think of some design alternatives for you to try.

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.