[BR_forum] Printer.Sys and Centering Tables

Discussion about printing issues and techniques.

Moderators: Susan Smith, admin, Gabriel

Post Reply
gothnerd at gmail.com

[BR_forum] Printer.Sys and Centering Tables

Post by gothnerd at gmail.com »

<![endif]--> <![endif]--> Clean Clean DocumentEmail false false false MicrosoftInternetExplorer4 <![endif]--> <![endif]--><![endif]--> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} <![endif]--> <![endif]--> <![endif]--> Is it possible in NWP to center a table (left and right) within the page?

-john bowman

Post generated using Mail2Forum (http://www.mail2forum.com)
GTISDALE at tisdalecpa...

[BR_forum] Printer.Sys and Centering Tables

Post by GTISDALE at tisdalecpa... »

<![endif]--> <![endif]--> Clean Clean DocumentEmail false false false MicrosoftInternetExplorer4 <![endif]--> <![endif]--><![endif]--> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} <![endif]--> <![endif]--> <![endif]--> Since the table is not an object, but a series of line prints the answer to the question as you asked it is no, you can not just tell NWP to center a table.

However, NWP centers, left justifies and right justifies based on a point that you specify.

Left justification takes a point and then simply prints from that point forward
Right justification sets a point, backs up from that point 1/10 inch for each character in the string being printed and then calculates the spaces needed to make the string end on the point specified.
Center justification works the same as right justification except it only uses 1/2 the characters in the calculation

Using these parameters in your print statements you can calculate a centered position for a table and make it work that way, but not have it automatically happen.

If you look at the library function FNPRINTNWP$ in the latest version of FNSNAP (no it is not described in the Wiki yet) you can see these calculations. FNPRINTNWP$ returns a string that positions your print string and justifies it based on the point that you specify.

00100 print #filnum:FNPRINTNWP$(V,H,J$,DATA$,font$,size)

Where font$ and size$ are optional
V is the vertical page position in inches
H is the horizontal page position in inches
J$ is an uppercase character for Left Right Center or Decimal
Data is the STRING$ to be printed.

The latest FNSNAP.dll is in the BRG_PUB directory. I have not put it into the ZIP section because I have not updated the documentation to cover the additional functions.


George L. Tisdale, CPA
Tisdale CPA
75 Junction Square Drive
Concord, MA 01742
(978) 369-5585
IRS Circular 230 Notice: "To ensure compliance with requirements imposed by the IRS, we inform you that any U.S. tax advice contained in this communication (including any attachments) is not intended or written to be used, and cannot be used, for the purpose of (i) avoiding penalties under the Internal Revenue Code or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein."

This electronic message transmission contains information which is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination or distribution of this communication to other than the intended recipient is strictly prohibited. If you have received this communication in error, please notify us immediately by calling (978) 369-5585 or by electronic mail (gtisdale@tisdalecpa.com) Thank you.
From: br_forum-bounces@maillist.ads.net [mailto:br_forum-bounces@maillist.ads.net] On Behalf Of John Bowman
Sent: 09/23/2008 11:22 AM
To: 'Business Rules Forum'
Subject: [BR_forum] Printer.Sys and Centering Tables



Is it possible in NWP to center a table (left and right) within the page?

-john bowman
Post generated using Mail2Forum (http://www.mail2forum.com)
gothnerd at gmail.com

[BR_forum] Printer.Sys and Centering Tables

Post by gothnerd at gmail.com »

<![endif]--> <![endif]--> Clean Clean DocumentEmail false false false MicrosoftInternetExplorer4 <![endif]--> <![endif]--><![endif]--> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} <![endif]--> <![endif]--> <![endif]--> thank you very much!

-john

From: br_forum-bounces@maillist.ads.net [mailto:br_forum-bounces@maillist.ads.net] On Behalf Of George Tisdale
Sent: Tuesday, September 23, 2008 12:15 PM
To: Business Rules Forum
Subject: RE: [BR_forum] Printer.Sys and Centering Tables



Since the table is not an object, but a series of line prints the answer to the question as you asked it is no, you can not just tell NWP to center a table.

However, NWP centers, left justifies and right justifies based on a point that you specify.

Left justification takes a point and then simply prints from that point forward
Right justification sets a point, backs up from that point 1/10 inch for each character in the string being printed and then calculates the spaces needed to make the string end on the point specified.
Center justification works the same as right justification except it only uses 1/2 the characters in the calculation

Using these parameters in your print statements you can calculate a centered position for a table and make it work that way, but not have it automatically happen.

If you look at the library function FNPRINTNWP$ in the latest version of FNSNAP (no it is not described in the Wiki yet) you can see these calculations. FNPRINTNWP$ returns a string that positions your print string and justifies it based on the point that you specify.

00100 print #filnum:FNPRINTNWP$(V,H,J$,DATA$,font$,size)

Where font$ and size$ are optional
V is the vertical page position in inches
H is the horizontal page position in inches
J$ is an uppercase character for Left Right Center or Decimal
Data is the STRING$ to be printed.

The latest FNSNAP.dll is in the BRG_PUB directory. I have not put it into the ZIP section because I have not updated the documentation to cover the additional functions.


George L. Tisdale, CPA
Tisdale CPA
75 Junction Square Drive
Concord, MA 01742
(978) 369-5585
IRS Circular 230 Notice: "To ensure compliance with requirements imposed by the IRS, we inform you that any U.S. tax advice contained in this communication (including any attachments) is not intended or written to be used, and cannot be used, for the purpose of (i) avoiding penalties under the Internal Revenue Code or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein."

This electronic message transmission contains information which is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination or distribution of this communication to other than the intended recipient is strictly prohibited. If you have received this communication in error, please notify us immediately by calling (978) 369-5585 or by electronic mail (gtisdale@tisdalecpa.com) Thank you.
From: br_forum-bounces@maillist.ads.net [mailto:br_forum-bounces@maillist.ads.net] On Behalf Of John Bowman
Sent: 09/23/2008 11:22 AM
To: 'Business Rules Forum'
Subject: [BR_forum] Printer.Sys and Centering Tables



Is it possible in NWP to center a table (left and right) within the page?

-john bowman
Post generated using Mail2Forum (http://www.mail2forum.com)
Post Reply