How can I format the results??
How can I format the results??
(OP)
I'm starting a WebFocus Course. I am using the Northwind database contained in SQLserver.
In my notes I read that you can format the title of the columns:
How can I format the result of the report? I have the column UnitsInStock, so, the Title is too long and the data are only 3 digits long. Is there a way to align the numbers at the center of the column.
Units In Stock
523
456
25
...
In my notes I read that you can format the title of the columns:
CODE
...
PRINT | ADDRESS |TITLE |
TITLE/L | St Louis Ave. 456 | SFDFT |
ADDRESS/C | RiverFlow St. 411 | RTHHE |
...
PRINT | ADDRESS |TITLE |
TITLE/L | St Louis Ave. 456 | SFDFT |
ADDRESS/C | RiverFlow St. 411 | RTHHE |
...
Units In Stock
523
456
25
...
RE: How can I format the results??
Column widths are the LARGER of either:
the column title
the format width
So, in your example, since the column title is wider that the field, it determines the column width.
In character oriented (non-GUI) output, numerics are right justified within the column width. If that's the output you want, you'll need to convert the fields to alpha (using either EDIT or the FTOA subroutine), and, once they're alpha, the subroutine CTRFLD can center them under the column heading.
Since you're using WebFOCUS, you probably DON'T want character format, but either HTML or PDF. In that case, you can use stylesheet commands to center the data. Here's an example:
CODE
PRINT SEATS AS 'CAR SEATS'
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=P1, JUSTIFY=CENTER,$
ENDSTYLE
END
P1 is the first printed column.