×
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

SUBTOTAL Problem

SUBTOTAL Problem

SUBTOTAL Problem

(OP)
Dear All,

I will use the CAR table to illustrate my problem. Below is the code

TABLE FILE CAR
PRINT
COUNTRY
CAR
RETAIL_COST
DEALER_COST
BY COUNTRY NOPRINT
BY CAR NOPRINT SUBTOTAL DEALER_COST
END
-EXIT

However, when it is displayed on the webpage, the subtotal of the dealer cost is not in the same line as the subtotal.

What could be the problem? or how can i allign it so that it is in the same line?

Regards,

Yue-jeen

RE: SUBTOTAL Problem

The problem is, because all your printed columns are verb objects, there's no PHYSICAL place to put the '* TOTAL' line, without overriding a verb object subtotal.

To solve this, use SUBFOOT instead. Through use of StyleSheet syntax, you can put the text for the '* TOTAL' anywhere you want.

Here's how I did what you asked:

CODE

TABLE FILE CAR
PRINT
COUNTRY
CAR
RETAIL_COST
DEALER_COST
BY COUNTRY NOPRINT
BY CAR NOPRINT SUBFOOT
"TOTAL RETAIL COST<ST.RETAIL_COST"
ON TABLE SET STYLE *
TYPE=SUBFOOT, HEADALIGN=BODY,$
TYPE=SUBFOOT, LINE=1, ITEM=1, COLSPAN=2,$
TYPE=SUBFOOT, LINE=1, ITEM=2, JUSTIFY=RIGHT,$
ENDSTYLE
END

I replaced your SUBTOTAL with a SUBFOOT, with TWO parts: text and an imbedded field (the subtotal of RETAIL_COST).

Using the StyleSheet code, I said the first item (the text) should span two columns (COUNTRY and CAR), and the second item should be right justified.

RE: SUBTOTAL Problem

(OP)
Dear focwizard,

Thank you very much!!! That is exactly what I needed.

Regards,

YJ

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