1. mahmoud mahmoud
  2. PowerBuilder
  3. Sunday, 20 November 2022 21:08 PM UTC

I need to Modify n-up datawindow after design like rows count from 4 row to 5 row

Brad Mettee Accepted Answer Pending Moderation
  1. Tuesday, 22 November 2022 14:40 PM UTC
  2. PowerBuilder
  3. # 1

This isn't that difficult to do.

Edit source of the datawindow (back it up first), find "rows_in_detail", change to new number, save and close DW source.

Edit datawindow normally, highlight/copy/place the objects for one full "row" of data. Before de-selecting new objects, set TAG to "fixme" (or something  unique within the datawindow). Save and close datawindow.

Edit source again, find the unique string. The block of copied objects *should* be at the end of the file, if not, you'll need to find the unique string throughout the file.

For each found column object, the property order should be row_in_detail, name, tag. You can change the properties to match your needs. If you want to remove the tag property as you go, delete the entire 'tag="fixme"' text (spaces don't seem to matter here, leave an extra or delete it, it'll be fine). Computes will be similar, but editing them isn't as easy. If you have embedded CRLF in your compute source, it'll span multiple lines of text in the source code editor as well. Just be careful to NOT sort the lines of text, or accidentally remove text that's part of the object syntax (nominally, each line in the DW source is one object, but anything with computed properties *might* have multiple lines, so be careful).

Once all of the source changes are saved, you should be able to open in graphics mode and test the retrieve to see if it all looks ok.

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Monday, 21 November 2022 16:58 PM UTC
  2. PowerBuilder
  3. # 2

Save yourself a LOT of grief and simply recreate the N-up datawindow.

That's a safer and much faster alternative to trying to rework the syntax of the existing N-up datawindow.

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Monday, 21 November 2022 12:30 PM UTC
  2. PowerBuilder
  3. # 3

There is no easy way to do that. N-up style isn't a simple style. Even syntaxfromsql doesn't support this style. But for a simple n-up datawindow (where you have not done to many optimizations this could be done. Of course the easiest would be to do the opposite! To change a datawindow from 5 to 4 columns is easier than to change it from 4 to 5. That's because you would simply have to get the datawindow syntax (using libraryexport for example) and delete column with row_in_detail = x and the corresponding header (starting always from the end).

In the contrary, adding a row (directly in syntax) implies following steps:

  • Add header (if you use one -> Duplicate the last one). Header name should be <colname>_t_<colno>. Example third column for lname would be: lname_t_3.
  • Add column (simply duplicate the last one). You have to give the right value to row_in_detail property. For the previous header it would be: row_in_detail=3
  • Reposition header and column position in x axis. Positioning should be something like (new_object.x) = (previous object).x + (previous object).width + (some additional threshold ex: 14 pb units).

Those steps can give the syntax. Then you will have to use datawindow create function. If your syntax has no errors your datawindow should be functioning.

Andreas.

Comment
There are no comments made yet.
mahmoud mahmoud Accepted Answer Pending Moderation
  1. Monday, 21 November 2022 11:13 AM UTC
  2. PowerBuilder
  3. # 4

i want to change it from 4 to >=5  but after finsh datawinow setup  and save datawindow

Comment
  1. Chris Pollach @Appeon
  2. Monday, 21 November 2022 16:09 PM UTC
Unfortunately, not in the DW Painter. You would have to edit the DWO source code yourself to adjust this UI.
  1. Helpful
There are no comments made yet.
Sivaprakash BKR Accepted Answer Pending Moderation
  1. Monday, 21 November 2022 06:40 AM UTC
  2. PowerBuilder
  3. # 5

AFAIK, Rework is the only solution.   Let's wait what others say.

 

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Sunday, 20 November 2022 21:38 PM UTC
  2. PowerBuilder
  3. # 6

Hi Mamoud;

  Do you mean vertical "columns" from 4 => 5?

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.