Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Anything new on Summary line for TABLE container (Fz.1132)?  (Read 13574 times)
Tim S.
Posts: 26


« on: November 12, 2008, 09:55:23 pm »

Has there been any progress on making a summary line for the TABLE container?

Thanks,
Tim S
Reuben B.
Four Js
Posts: 1119


« Reply #1 on: November 14, 2008, 06:16:58 am »

I'll leave it up to the developers in Strasbourg to comment on any progress.  My views on this can be found in other threads dating back to when I was a 4Js customer.

One thing I've been thinking about recently is maybe we are approaching the problem from the wrong direction.  Instead of saying what can we do to TABLE to give it a summary line, why don't we also look at SCROLLGRID where you can have a perfectly good total aligning up with a column and say what can we do to SCROLLGRID to make its appearance more suitable i.e. remove the gap between columns, and give it some (but probably not all) of the table column sort/hide/move functionality.

A SCROLLGRID solution will match existing code that may feature multiple totals for a column e.g. the nett plus tax = gross scenario, and headers spanning multiple columns, neither of which can be done suitable in a TABLE.

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
.
Four Js
Posts: 115


« Reply #2 on: November 24, 2008, 09:15:04 am »

Actually, there are two issues with summary line:

1. 4GL side.
2. GUI side.

The 4GL side is how to define the summary line.

- Should this be free fields you can manipulate anyway you want ?
i.e.

Code
  1. DISPLAY ARRAY ...
  2.  BEFORE DISPLAY
  3.   LET summary.discount = calculateDiscountSum()
  4.   LET summary.total = calculateTotalSum()
  5.  
  6. ON KEY(F5)
  7.   DISPLAY "foo" TO summary.XXX
  8. END DISPLAY
  9.  

- Should this something completely static, i.e.

Code
  1. TABLE
  2. {
  3. [a             |b                  ]
  4. [a             |b                  ]
  5. [a             |b                  ]
  6. }
  7. END
  8.  
  9. ATTRIBUTES
  10. EDIT a = orders.customer, SUMMARYLINE="count";
  11. EDIT b = orders.total, SUMMARYLINE="sum";
  12.  

And everything is done for you ?


On the GUI side, the main issue is there is no such widget out of the box in the GUI Toolkit we're using for GDC ; we've been told several times: "this is likely to be done in the next release". Therefore we decided to focus on something else instead of spending hours on doing our own widget which may be made obsolete in a near future.

Unfortunately the widget is still not here - this also explains why the 4GL side has not been decided yet.

Any comment or suggestion on the 4GL defintion is welcome (I bet that if the definition side is done, this will push the GUI side).

Tim S.
Posts: 26


« Reply #3 on: November 25, 2008, 03:02:40 pm »

For simplicity I would like to say it could be done in the .per file.

However, reality tells me that being able to manipulate the fields in 4gl code would be a better long term solution because no matter how many functions you manage to define for use in the .per file, it would only be a matter of time before one of us needed something different.

As mentioned by Rueben, any solution also should allow for multiple summary lines with different totals.

Quick thought...your widget has headers for column titles, I don't suppose it has footers that could be used for totals... ?
.
Four Js
Posts: 115


« Reply #4 on: November 25, 2008, 04:38:49 pm »

Unfortunately no: it has horizontal (top) and vertical (left) headers, and that's it.

"Quick" solution on our side would be to glue two tables - with some optimisations to prevent GDC from eating all memory. Maybe not nice, but this would do the job, and - hopefully - you as an end user you will not see anything.

And this will help us to use multirow / multi cell summary line, but again a complex summary line is likely to end up with a complex definition.
Sebastien F.
Four Js
Posts: 545


« Reply #5 on: November 25, 2008, 04:50:44 pm »

We have a spec draft for that, and several ideas in mind...

Ideally I would like to define any sort of field/widget in a multi-line summary of a table, and be able to control it with dialogs/variables.

I would like to do a CONSTRUCT on summary cells to keep the search criteria visible while displaying the result set of the query.
This would be possible with DIALOG / END DIALOG, using DISPLAY ARRAY + CONSTRUCT.

Displaying typical summary data would then be achieved with DISPLAY ARRAY + INPUT BY NAME using label fields.

I would also like to display a combo box below each column, for example to let the user select a display configuration option of the column data...

Seb
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines