407-248-1481

QuoteWerks Knowledgebase Topic (Article ID 5446)

Print Layouts - Conditional Font Bold

This information applies to :

Article ID
5446

Created/Updated
July 17, 2019

Category
Print Layouts


Are you using the most current release of QuoteWerks?
Version 24.0 Build 2
Question:
Is it possible to bold comments, subtotals, running subtotals, etc. without bolding the description for all items on the document?

Answer:
In the print layout, you can setup a conditional font that makes the font bold based on the type of line item that is being printed.

For example, you can make all the Comment type line items font bold.

1. Click on Print, select the layout, and click the Edit Button.
2. Select the Reports->Named Fonts menu, and then select 'New'
3. Give the Named Font a name of "BoldFont" (for example).
4. Choose the font name, size, and boldness.
5. Select the Reports->Conditional Fonts, and select 'New'
6. Give the Font Expression a name of "TestForBoldFont"
7. In the Font Expression box type:

.IF. DocumentItems->LineType = 2 .THEN. "BoldFont" .ELSE. ""

8. Select the description field in the print layout, and select the Format menu, and choose 'conditional font.'

Notes:
One of the default quote print layouts that comes with QuoteWerks is setup to bold the description field for comment type line items. You can try printing that print layout to see what it looks like.

------------------------------------------------------------
Advanced Conditional Font Example:

If you want to setup a conditional font to print Comment lines in bold, SubTotal in italic and Running Sub totals in underline bold italic in the same document Description Field this is how to do it:

.if.documentitems->linetype=2.then."CommentFont".else.(.if.documentitems->linetype=4.then."SubtotalFont".else.(.if.documentitems->linetype=16.then."RunningSubTotalFont".else.""))

For the conditional font formula create the font names of:

CommentFont
SubTotalFont
RunningSubTotalFont

Another Advanced Conditional Font Example:
If you want to setup a conditional font to print Comment lines in italic, Headers in bold, SubTotal in bold and Running Sub totals in bold in the same document Description Field this is how to do it:
.if.documentitems->linetype=2.then."ItalicFont".else.(.if.documentitems->linetype=4.then."BoldFont".else.(.if.documentitems->linetype=16.then."BoldFont".else.(.if.documentitems->linetype=256.then."BoldFont".else."")))
ItalicFont
BoldFont

----------------------------------------------------------------------------------------------
Tip: Each line type and all Line Attributes in QuoteWerks have a numeric value (a full list can be found here: https://www.quotewerks.com/helpfile/qwhelp.htm?appendixdeveloperintegrationnotes.htm).

For example:

A line type of Subtotal has a value of 4

A line type of Running Subtotal has a value of 16

A line type of Comment has a value of 2

A line type of Header has a value of 256

A line attribute of Hide Price has a value of 2



For a full list of these numeric values, please refer to the section in the QuoteWerks manual entitled "Appendix C: Developer Integration Notes" If you do not have a hard copy of the QuoteWerks Manual, you can view the manual by simply launching QuoteWerks and selecting Help->View Manual.

New Search