×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How can I format the results??

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:

CODE

...
PRINT                 |       ADDRESS        |TITLE      |
  TITLE/L             |  St Louis Ave. 456   |     SFDFT |
  ADDRESS/C           |  RiverFlow St. 411   |     RTHHE |
...
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
       ...

RE: How can I format the results??

My first question is "What output format do you want?".

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

TABLE FILE CAR
PRINT SEATS AS 'CAR SEATS'
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=P1, JUSTIFY=CENTER,$
ENDSTYLE
END

P1 is the first printed column.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close