Help with Column-Labels

djeanveau

New Member
Hello,

I wonder if my previous thread was detailed enough.

This thread is for anyone who is familiar with creating adhocs/reports from pure progress code.

My problem is this, why is it that when I output my data to a stream, my columns appear like so:

Dept-- Prg BL--Error Description---------------------------------------------


When it should appear like the following:

Dept Prg BL Error Description
---- --- -- ----------------------------------------------------------

Has anyone seen this before?
Thanking anyone in advance for the answer!


Denis
 

paulwesterman

New Member
column labels

I need you to answer a couple of questions before I'll know if I can help or not:

Can you show me the code you used to define your column labels - or are you depending upon the database definition of the column labels?

Are you using a display statement or a put statememt to output your data?
 
The only similar thing that I recall seeing is where the dotted line is no longer broken to match the length of the label, but is continuous like this:

Dept Prg BL Error Description
----------------------------------------------------------------------

You get this when the line is wrapped. You'll get a linewrap when the combined width of all of the fields (and the spacing between them) exceeds the frame width that you've specified.
 

djeanveau

New Member
Here you go Paul, parts of the code that might help...

FORM HEADER
"Date: " TODAY
"Page: " AT 116 PAGE-NUMBER(serr) FORMAT ">>>9"
SKIP
"Exception/Error - Update ME FROM ARLU" AT 46
SKIP (2)
WITH NO-BOX NO-LABELS PAGE-TOP WIDTH 132
FRAME fheader.

FORM
arlu-ref.dep-key
arlu-ref.prg-num
arlu-ref.pelm-num
vmatch LABEL "Error Description" FORMAT "x(60)"
arlu-ref.NAME FORMAT "x(45)"
WITH FRAME frep OVERLAY WIDTH 132.

OUTPUT STREAM serr TO "C:\TEST.ERR" PAGED PAGE-SIZE 68.
VIEW STREAM serr FRAME fheader.

DISPLAY STREAM serr
arlu-ref.dep-key
arlu-ref.prg-num
arlu-ref.pelm-num
vmatch
arlu-ref.NAME
WITH FRAME frep DOWN WIDTH 165.
DOWN WITH FRAME frep.
 

Kevin Decker

New Member
Assuming width of info does not exceed the width of the frame, I would change as highlighted below.


FORM HEADER
"Date: " TODAY
"Page: " AT 116 PAGE-NUMBER(serr) FORMAT ">>>9"
SKIP
"Exception/Error - Update ME FROM ARLU" AT 46
SKIP (2)
WITH FRAME fheader NO-BOX NO-LABELS PAGE-TOP WIDTH 132 STREAM-IO.


FORM
arlu-ref.dep-key
arlu-ref.prg-num
arlu-ref.pelm-num
vmatch LABEL "Error Description" FORMAT "x(60)"
arlu-ref.NAME FORMAT "x(45)"
WITH FRAME frep WIDTH 132.

OUTPUT STREAM serr TO "C:\TEST.ERR" PAGED PAGE-SIZE 68.
VIEW STREAM serr FRAME fheader.

DISPLAY STREAM serr
arlu-ref.dep-key
arlu-ref.prg-num
arlu-ref.pelm-num
vmatch
arlu-ref.NAME
WITH FRAME frep WIDTH 132.
DOWN WITH FRAME frep.

Hope this helps!
 

paulwesterman

New Member
I didn't find anything wrong with your code - could it be the application you use to look at the results doesn't display them correctly? Open your TEST.ERR file in the PROGRESS editor and see if you get the results you expect.

Below is your code that I edited to use a temp-table in place of your database table and the results it produced. As you can see I didn't change any formatting in the FORM definition

def temp-table t-layout no-undo
field dept as char format 'x(4)'
field prg as char format 'xxx'
field bl as char format 'xx'
field ref as char format 'x(45)'
index pri is primary dept.

def var serr as int no-undo.
def var vmatch as char format 'x(60)' no-undo.
def var i as int no-undo.

def stream serr.

FORM HEADER
"Date: " TODAY
"Page: " AT 116 PAGE-NUMBER(serr) FORMAT ">>>9"
SKIP
"Exception/Error - Update ME FROM ARLU" AT 46
SKIP (2)
WITH NO-BOX NO-LABELS PAGE-TOP WIDTH 132
FRAME fheader.

FORM
t-layout.dept
t-layout.prg
t-layout.bl
vmatch LABEL "Error Description" FORMAT "x(60)"
t-layout.ref FORMAT "x(45)"
WITH FRAME frep OVERLAY WIDTH 132.

OUTPUT STREAM serr TO "/nfs2/pwesterm/TEST.ERR" PAGED PAGE-SIZE 68.
VIEW STREAM serr FRAME fheader.

vmatch = fill('0', 60).

do i = 1 to 10:

create t-layout.
assign t-layout.dep = fill(string(i), 4)
t-layout.prg = fill(string(i), 3)
t-layout.bl = fill(string(i), 2)
t-layout.ref = fill(string(i), 45).


DISPLAY STREAM serr
t-layout.dep
t-layout.prg
t-layout.bl
vmatch
t-layout.ref
WITH FRAME frep DOWN WIDTH 165.
DOWN WITH FRAME frep.
end.


The results below aren't shown correctly here because of the text wrap (something like Mike referred to), but you can see that the dotted line is under the column label like you want:


Date: 11/04/03 Page: 1
Exception/Error - Update ME FROM ARLU



dept prg bl Error Description ref
---- --- -- ------------------------------------------------------------ ---------------------------------------------
1111 111 11 000000000000000000000000000000000000000000000000000000000000 111111111111111111111111111111111111111111111
2222 222 22 000000000000000000000000000000000000000000000000000000000000 222222222222222222222222222222222222222222222
3333 333 33 000000000000000000000000000000000000000000000000000000000000 333333333333333333333333333333333333333333333
4444 444 44 000000000000000000000000000000000000000000000000000000000000 444444444444444444444444444444444444444444444
5555 555 55 000000000000000000000000000000000000000000000000000000000000 555555555555555555555555555555555555555555555
6666 666 66 000000000000000000000000000000000000000000000000000000000000 666666666666666666666666666666666666666666666
7777 777 77 000000000000000000000000000000000000000000000000000000000000 777777777777777777777777777777777777777777777
8888 888 88 000000000000000000000000000000000000000000000000000000000000 888888888888888888888888888888888888888888888
9999 999 99 000000000000000000000000000000000000000000000000000000000000 999999999999999999999999999999999999999999999
1010 101 10 000000000000000000000000000000000000000000000000000000000000 101010101010101010101010101010101010101010101
 

brucebp

New Member
The problem with the original output is that Progress wants to design the frame layout based on certain field decorations. If you are redirecting output to a file or a printer, you should add the STREAM-IO option on the frame phrase or COMPILE the program with the STREAM-IO option on the COMPILE statement. Reference the programming handbook for more info on STREAM-IO vs. SCREEN-IO.
 
Top