Some
of the topics covered below are applicable to more than one
TPL product. We have put the product name(s) to which the
discussion applies in parentheses at the beginning of each
topic.
(TPL
Tables) I would like to remove the vertical lines between
table columns, from just below the horizontal line at the
top of the heading to just above the rule at the bottom of
the table. In the horizontal rules within the heading, I sometimes
want to have a space between categories. Other times, I want
solid lines. Can I do all of these things?
Yes.
As you have probably noted already, the DELETE DOWN RULE
statement removes vertical rules between table columns,
but it only does part of what you want. It removes the vertical
rules in the data part of the table, but not in the heading.
To get
everything you want, use the statement REPLACE DIVIDE CHARACTER
instead. The options are:
1. REPLACE
DIVIDE CHARACTER WITH ' ';
(where the character in quotes is a blank)
This
statement replaces the column dividers from the top of the
heading to the bottom of the table with the character in
quotes, in this case a blank. The horizontal lines in the
heading are "broken" with a blank at any point where the
column divider passes through the heading.
2. REPLACE
DIVIDE CHARACTER WITH ' ' EXCEPT ZERO;
This
statement works the same as the previous one, but gives
a solid horizontal line at the bottom of the heading.
3. REPLACE
DIVIDE CHARACTER WITH '';
(where there is no character between the quotes)
With
this statement, the column dividers are replaced with blanks,
but the horizontal lines in the heading are solid lines.
Top
of Page
(TPL
Tables) How can I replace the values in some table cells with
a character string that is right-aligned in the cells? I tried
to do it with a REPLACE MASK statement, but the character
string was centered in the cells.
You
can't do this with a normal MASK, because the alignment
specification won't apply if the MASK contains only a character
string. For example, if you say:
FOR ROWS 2 TO 6, COLUMN 3:
REPLACE MASK WITH '--'
RIGHT;
the
specification of RIGHT will be ignored and the character
string '--' will be centered in the cells.
The
solution is to replace the mask with TEXT. This will cause
the character string to be formatted like a label and the
alignment will work the way you want it to. Simply insert
the word TEXT in front of the character string as follows:
FOR ROWS 2 TO 6, COLUMN 3:
REPLACE MASK WITH TEXT
'--' RIGHT;
For
more information, see "Replacing Masks with Text" in the
REPLACE MASK section of the Format chapter in the TPL Tables
manual.
Top
of Page
(TPL
Tables) I have a collection of footnotes and notes to be displayed
at the end of a table. Can I control the order of display
for both footnotes and notes using a FOOTNOTE SEQUENCE statement?
Yes,
both footnotes and notes can be listed in a FOOTNOTE SEQUENCE
statement. For the following footnotes and notes, the footnotes
"dental" and "df" will be assigned footnote symbols "1"
and "2". At the end of the table, they will be displayed
ahead of the note called "src".
set footnote dental text 'Participants who elected dental
coverage only.';
set footnote df text 'Data collected for the month of March.';
set note src text 'Source: Department of Health.';
If we
want the note "src" to preceed the numbered footnotes, we
can list the order we want using a FOOTNOTE SEQUENCE statement
that references both the footnotes and the notes in the
desired order:
footnote sequence src df dental;
Top
of Page
(TPL
Tables & TPL Report) I have several tables in my job.
Why are some of my format statements being applied to the
wrong tables?
A
typical, more specific example of this question would be:
In
my first table, I requested a column width of 15, but the
third column is too narrow. What's wrong?
This
problem often occurs because of a misunderstanding of how
FOR clauses work in a format request -- or, if you know
how they work, you can still make a mistake. A FOR clause
applies to the statements that follow it until there is
another FOR clause. Then, if the later FOR clause is followed
by statements that can override statements in the earlier
FOR clause, they will take precedence.
For
example:
FOR TABLE 1: COLUMN WIDTH = 15;
FOR TABLE 3: STUB WIDTH = 10;
COLUMN WIDTH
= 12;
FOR COLUMN 3:
COLUMN WIDTH = 7;
As a
result of these format statements, the third column will
have a column width of 7 in all tables. Why? Because the
last statement:
FOR COLUMN 3: COLUMN WIDTH = 7;
has
no table specification. Thus, it applies to the third column
of all tables, including TABLE 1.
We can
tell by the way that the user indented the statement that
it was intended to apply only to the third table, but the
indentation has no effect on the result.
How
to fix it? Include the table specification in the statement
to limit it to the third table. Then the sequence of statements
will be:
FOR TABLE 1: COLUMN WIDTH = 15;
FOR TABLE 3: STUB WIDTH = 10;
COLUMN WIDTH
= 12;
FOR TABLE 3, COLUMN 3: COLUMN WIDTH = 7;
Tips
for Preventing this Problem
1. DO
NOT indent FOR clauses. As noted above, the indentation
has no effect on the result, but it makes it look like it
will. It also makes it harder to find problems when the
results are not what you intended.
2. DO
indent the statements that go with a particular FOR clause
to show where they will be applied.
3. If
you are adding a statement with a FOR clause and you are
uncertain about the scope of a statement, add enough qualification
in the FOR clause to be sure that it will be limited to
the correct place.
4. If
you have a problem similar to the example above and you
can't find it in your format request, check to see if you
have any %INCLUDE statements in the format request. Sometimes,
statements with FOR clauses are "hidden" in included files.
5. When
people call us for help on problems of this type, the most
common cause is a statement with a FOR clause that specifies
certain columns, as shown in the example above. Other possible
causes to look for are FOR clauses that reference only specific
wafers, rows, variables, conditions or table cells. Also,
there are some statements that apply to a whole request
or table and cannot be limited more precisely with a FOR
clause. These are noted in the "Level" section of each format
statement in the manuals.
Top
of Page
(TPL
Tables & TPL Report) I'm producing several tables in my
job and running in PostScript mode. I want to use the same
overall format for all of the tables -- same fonts, same column
widths, etc. -- but in one of the tables, the data values
are substantially bigger than in the rest and won't quite
fit in the columns. I don't want to make the columns wider
in this table. Can I reduce the font size for the data values
so that the values will fit, but the rest of the table style
will still match my other tables?
Yes.
As you probably know, there is no FONT statement that applies
specifically to data cells, so the DEFAULT FONT is normally
used for the data values in all tables. You cannot specify
a different default font for different tables. Instead,
to change the font for the data values in a specific table,
you can use the format statement:
REPLACE MASK FONT WITH font-name font-size;
This
statement lets you change the font in the data cells without
disturbing any other mask specifications you may be using
in the table. For example:
DEFAULT FONT = H 10;
FOOTNOTE TEXT FONT = H 8;
FOOTNOTE SYMBOL FONT = H 8;
TITLE FONT = HB 12;
COLUMN WIDTH = 8;
FOR TABLE 5: REPLACE MASK FONT WITH H 9;
The
first statements set the fonts and column width for all
tables. Then we replace the mask font for fifth table only,
reducing the size to 9 for that table.
Top
of Page
I
am getting a column total with the label TOTAL (all upper case)
and I want it to be "Total". How can I do this?
The TOTAL
label is coming from the following Define statement in your
table request.
Define
tot_attempts on place;
total if all;
Since
total is not in quotes, it is a name that is used as a label.
All names are converted to upper case whereas labels can have
upper and lower case letters. There are multiple ways to get
"Total" instead of TOTAL.
1. Change
the Define statement to have a "Total" label instead of a
name.
Define
tot_attempts on place;
"Total" if all;
2. In
place of tot_attempts, use the built-in variable named Total.
It has a label of "Total" and gives the same result as a Define
catergory of All.
3. Make
tot_attempts be a Label variable instead of a Define.
LABEL
tot_attempts "Total";
A Label
variable gives the same results as the built-in variable named
Total, but you can give it the label of your choice.
Top
of Page
My table has a value 31.2500 that is rounding to 31.2 with
a mask of 99.9. Why is it rounding down to 31.2 when I expect
it to round up to 31.3?
The
default rounding rule in TPL, called "round even" or "round-to-even",
is part of the IEEE and ANSI standards for binary and floating
point arithmetic. Rather than always being rounded up, the
number 5 followed only by 0's is rounded up or down depending
on the digit to the left of the 5. If the digit to the left
of the 5 is even, it rounds down. If the digit to the left
is odd, it rounds up. (A blank to the left is considered to
be a zero and thus even.) Since the value 31.2500 has the even
number 2 to the left of the 5, the value is rounded down to
31.2. A value such as 3.7500 has the odd number 7 to the left
of the 5, so the value is rounded up to 3.8. Beginning
with Version 5.2 of TPL, you have the option of rounding up.
You choose the rounding method in profile.tpl. See the ROUND
Format statement for details.
Top
of Page
How can I call the Windows version of TPL from another Windows
program?
TPL is
a collection of C programs. It is not available as a .DLL
or ActiveX component. However, it is easy to use the Windows
version of TPL as part of another Microsoft Windows program.
TPL can be run completely in the background so that there
is no evidence on the screen that TPL is being used. The sample
C code shows one way this may be done.
Top
of Page
|