Resolved Enable Browser with other objects on the form.

Kalan

Member
Hi all,

I am trying to display browser with other objects on the form. Its unix CHUI environment, not sure why only the browser gets displayed on the screen as I could not see Total: and its sum values under each column of the browser.

Can someone pls suggest on this? - Thanks. The example code snippet below,

define query q_table for t_table.
define browse b_table query q_table
display
t_table.c_col1 label "Col 1"
t_table.c_col2 label "Col 2"
t_table.c_col3 label "Col 3"
with 17 down width 78 no-box.

form
b_table skip
"Total:" AT Col 1
ivTotalCol1 AT COL 5
ivTotalCol2 AT COL 10
ivTotalCol3 AT COL 15
with frame fr-Browse title "Test".

Main Block:
enable all with frame fr-Browse.

do on endkey undo,leave.
wait-for close of frame fr-Browse.
end.
 

LarryD

Active Member
Well -- 1st thing is that you would have a problem in the display (unless intended) as you have the "Total:" starting at column 1 and the totals starting at column 5 and the length of "Total:" is 6 + 1 for the space separator.

Next, use code tags around your code examples for posting here.

Then you don't really say where these iv totals are coming from. Calculated? Some values from a table?

And while it may work (never really tried it the way you have it) you really shouldn't in my opinion use a "do on endkey" around the wait-for close. Use an ON END-ERROR trigger to set something or apply a close..

a bit more information and clearer code would help.

Also what have you tried?
 

Kalan

Member
Well -- 1st thing is that you would have a problem in the display (unless intended) as you have the "Total:" starting at column 1 and the totals starting at column 5 and the length of "Total:" is 6 + 1 for the space separator.

Next, use code tags around your code examples for posting here.

Then you don't really say where these iv totals are coming from. Calculated? Some values from a table?

And while it may work (never really tried it the way you have it) you really shouldn't in my opinion use a "do on endkey" around the wait-for close. Use an ON END-ERROR trigger to set something or apply a close..

a bit more information and clearer code would help.

Also what have you tried?
Thanks Larry, Sorry... pls ignore the Wait-for and how iv_totals value is derived and what column position "Total" string constant is being displayed. This code snippet works as expected to display the browser, the only missing object is "Total" row underneath the browser. My question here...Is form can display multiple objects along with browser object in CHUI environment.?
 

LarryD

Active Member
Where they come from and when you display them is important.

Regardless, if you calculate it, once the calculation is done just display those iv totals with frame framename.
If it comes from a db table, then do the same and display them once you have the table record via a find or whatever.
 

Kalan

Member
Where they come from and when you display them is important.

Regardless, if you calculate it, once the calculation is done just display those iv totals with frame framename.
If it comes from a db table, then do the same and display them once you have the table record via a find or whatever.
Thanks Larry, those are variable calculated adding temp table columns. Just to remove the complexity of variable values, pls take the below example of FORM statement,
My expectation on below "Form" declaration statement should have the ability to display browser and string constant "Total" underneath the browser. But it only displays the browser.

form
b_table skip
"Total:"
with frame fr-Browse title "Test".
 

Kalan

Member
This has been resolved by reducing the number of rows on browser display.
For example,
define browse b_table query q_table
display
t_table.c_col1 label "Col 1"
t_table.c_col2 label "Col 2"
t_table.c_col3 label "Col 3"
with 16 down width 78 no-box.
 
Top