<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.rws.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Formatting rules</title><link>https://community.rws.com/product-groups/trados-portfolio/business-manager/w/wiki/4962/formatting-rules</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12 Non-Production</generator><item><title>Formatting rules</title><link>https://community.rws.com/product-groups/trados-portfolio/business-manager/w/wiki/4962/formatting-rules</link><pubDate>Mon, 26 Apr 2021 06:18:18 GMT</pubDate><guid isPermaLink="false">10acfa76-f078-475b-a7ef-fc5b3e8d2934:4efdeabb-e161-42d8-95d8-9b6ad997cc6c</guid><dc:creator>Eugene Kuchynski</dc:creator><comments>https://community.rws.com/product-groups/trados-portfolio/business-manager/w/wiki/4962/formatting-rules#comments</comments><description>Current Revision posted to Wiki by Eugene Kuchynski on 4/26/2021 6:18:18 AM&lt;br /&gt;
&lt;p&gt;Formatting rules feature is one of the most important features of the template designer. It allows to create rules with specific criteria, and apply particular formatting to the corresponding elements when this criteria is met.&lt;/p&gt;
&lt;p&gt;Formatting rules may be applied to any report element (like labels) or whole bands. You can apply rules to any element (for example, a band, or text control, or table row), by selecting it and finding list of rules in the properties panel, under &lt;strong&gt;Appearance - Formatting rules&lt;/strong&gt; section, where you can create and edit formatting rules, as well as use check boxes to apply them to a selected element.&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-02-93/pastedimage1619417425544v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;To view formatting rule properties, expand it using a triangle on the left:&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-02-93/pastedimage1619417480828v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Formatting rules allow may affect the following properties when applied to elements:&lt;/p&gt;
&lt;div class="p"&gt;
&lt;ul id="GUID-F425F9EC-FBD4-4085-B3D5-FD02F44697FB__UL_B0BC077C47AA4AF980345CCEE0463E5A"&gt;
&lt;li id="GUID-F425F9EC-FBD4-4085-B3D5-FD02F44697FB__LI_2753B08F10814E8FB701C856A33DFF2D"&gt;Background color&lt;/li&gt;
&lt;li id="GUID-F425F9EC-FBD4-4085-B3D5-FD02F44697FB__LI_B9ED9728E9E347478976BCE059834948"&gt;Border color&lt;/li&gt;
&lt;li id="GUID-F425F9EC-FBD4-4085-B3D5-FD02F44697FB__LI_8BCDAF017BC148599D4657C8B296E945"&gt;Border dash style&lt;/li&gt;
&lt;li id="GUID-F425F9EC-FBD4-4085-B3D5-FD02F44697FB__LI_ECF5B5C64CE74B1B87891D5CC1C1FF28"&gt;Borders&lt;/li&gt;
&lt;li id="GUID-F425F9EC-FBD4-4085-B3D5-FD02F44697FB__LI_D1D4FC9E4632460CB1F6BCBCCF17D506"&gt;Border width&lt;/li&gt;
&lt;li id="GUID-F425F9EC-FBD4-4085-B3D5-FD02F44697FB__LI_78F6AF469C7C4171B66029C75ABF8AC0"&gt;Font&lt;/li&gt;
&lt;li id="GUID-F425F9EC-FBD4-4085-B3D5-FD02F44697FB__LI_722E5C25512743B2A753656968A918D8"&gt;Foreground (text) color&lt;/li&gt;
&lt;li id="GUID-F425F9EC-FBD4-4085-B3D5-FD02F44697FB__LI_E04C077B4D9D476795E9BC3AB3928392"&gt;Text alignment&lt;/li&gt;
&lt;li id="GUID-F425F9EC-FBD4-4085-B3D5-FD02F44697FB__LI_570423C479AD48B1A6B9A76A8327E849"&gt;Visibility&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In the &lt;strong&gt;Condition&lt;/strong&gt; property, you can specify an expression which will determine a condition when a rule should be applied or not. In the condition body, you can use data fields from a current context, where a rule is applied. In the example above, we&amp;#39;re applying a rule for a root &lt;strong&gt;Invoice&lt;/strong&gt; object (because &lt;strong&gt;Data Member&lt;/strong&gt; property is empty). In the expression editor, you will find list of available fields, so it&amp;#39;s not necessary to know/remember them. However, if you select something in the &lt;strong&gt;Data member&lt;/strong&gt; property (for example, Invoice items), then this rule will use fields from this table, and it should be applied in a context where Invoice &lt;strong&gt;items table&lt;/strong&gt; is used.&lt;/p&gt;
&lt;p&gt;For example above, the&amp;nbsp;condition is met when&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Tax1&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;field of the printed invoice is not empty. When this criteria is met,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Visible&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;property of the attached element is changed to&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Yes&lt;/strong&gt;. If you will find SubBandTax1 band in the report and select it, you will see that its&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Visible&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;property is set to&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;No&lt;/strong&gt;. This means that this band is not printed by default. In the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Formatting rules&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;property of this band this rule (&lt;strong&gt;ruleTax1&lt;/strong&gt;) is applied. This allows to change &lt;strong&gt;Visible&lt;/strong&gt; property of the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;SubBandTax1&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;band from&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;No&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;to&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Yes&lt;/strong&gt;, when&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Tax1&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;field of an invoice being printed is not empty.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;As you see, formatting rules are&amp;nbsp;extensively used in invoice templates. For example, you may select invoice accent color in the application settings. Depending on the selected color, invoice elements will have different background and foreground colors. This has been achieved using formatting rules feature. Another example is possibility to hide template elements depending on values of the invoice being printed. Visibility change option allows to hide tax amounts if no any tax is selected in the invoice being printed. The same applies to invoice notes, discounts and any other elements.&lt;/p&gt;
&lt;p&gt;It is not required from you to remember how to use&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="uicontrol"&gt;IsNull&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;function - it can be picked-up from the list in the condition editor:&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-02-93/pastedimage1619417900323v3.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: reporting, designer, custom reports&lt;/div&gt;
</description></item><item><title>Formatting rules</title><link>https://community.rws.com/product-groups/trados-portfolio/business-manager/w/wiki/4962/formatting-rules/revision/1</link><pubDate>Wed, 17 Jul 2019 08:33:18 GMT</pubDate><guid isPermaLink="false">10acfa76-f078-475b-a7ef-fc5b3e8d2934:4efdeabb-e161-42d8-95d8-9b6ad997cc6c</guid><dc:creator>Eugene Kuchynski</dc:creator><comments>https://community.rws.com/product-groups/trados-portfolio/business-manager/w/wiki/4962/formatting-rules#comments</comments><description>Revision 1 posted to Wiki by Eugene Kuchynski on 7/17/2019 8:33:18 AM&lt;br /&gt;
&lt;p&gt;Formatting rules feature is one of the most important features of the template designer. It allows to create rules with specific criteria, and apply particular formatting to the corresponding elements when this criteria is met.&lt;/p&gt;
&lt;p&gt;Formatting rules may be applied to any report element (like labels) or whole bands. You can access it from the helper menu:&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-02-93/pastedimage1563352183776v1.png" alt=" " /&gt;&lt;br /&gt;or via &lt;strong&gt;Properties&lt;/strong&gt; panel:&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-02-93/pastedimage1563352196740v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Example of the &lt;strong&gt;Formatting rule sheet&lt;/strong&gt; window:&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-02-93/pastedimage1563352212850v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Formatting rules allow may affect the following properties when applied to elements:&lt;/p&gt;
&lt;div class="p"&gt;
&lt;ul id="GUID-F425F9EC-FBD4-4085-B3D5-FD02F44697FB__UL_B0BC077C47AA4AF980345CCEE0463E5A"&gt;
&lt;li id="GUID-F425F9EC-FBD4-4085-B3D5-FD02F44697FB__LI_2753B08F10814E8FB701C856A33DFF2D"&gt;Background color&lt;/li&gt;
&lt;li id="GUID-F425F9EC-FBD4-4085-B3D5-FD02F44697FB__LI_B9ED9728E9E347478976BCE059834948"&gt;Border color&lt;/li&gt;
&lt;li id="GUID-F425F9EC-FBD4-4085-B3D5-FD02F44697FB__LI_8BCDAF017BC148599D4657C8B296E945"&gt;Border dash style&lt;/li&gt;
&lt;li id="GUID-F425F9EC-FBD4-4085-B3D5-FD02F44697FB__LI_ECF5B5C64CE74B1B87891D5CC1C1FF28"&gt;Borders&lt;/li&gt;
&lt;li id="GUID-F425F9EC-FBD4-4085-B3D5-FD02F44697FB__LI_D1D4FC9E4632460CB1F6BCBCCF17D506"&gt;Border width&lt;/li&gt;
&lt;li id="GUID-F425F9EC-FBD4-4085-B3D5-FD02F44697FB__LI_78F6AF469C7C4171B66029C75ABF8AC0"&gt;Font&lt;/li&gt;
&lt;li id="GUID-F425F9EC-FBD4-4085-B3D5-FD02F44697FB__LI_722E5C25512743B2A753656968A918D8"&gt;Foreground (text) color&lt;/li&gt;
&lt;li id="GUID-F425F9EC-FBD4-4085-B3D5-FD02F44697FB__LI_84C2CD79061E4F7B829B96A68CF97F58"&gt;Padding&lt;/li&gt;
&lt;li id="GUID-F425F9EC-FBD4-4085-B3D5-FD02F44697FB__LI_E04C077B4D9D476795E9BC3AB3928392"&gt;Text alignment&lt;/li&gt;
&lt;li id="GUID-F425F9EC-FBD4-4085-B3D5-FD02F44697FB__LI_570423C479AD48B1A6B9A76A8327E849"&gt;Visibility&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;p&gt;This feature is extensively used in invoice templates. For example, you may select invoice accent color in the program settings. Depending on the selected color, invoice elements will have different background and foreground colors. This has been achieved using formatting rules feature. Another example is possibility to hide template elements depending on values of the invoice being printed. Visibility change option allows to hide tax amounts if no any tax is selected in the invoice being printed. The same applies to invoice notes, discounts and any other elements.&lt;/p&gt;
&lt;p&gt;Formatting rules are created via Formatting rule sheet property of the template. You may access it via report helper menu or via report properties window&lt;/p&gt;
&lt;p&gt;In the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Condition&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;property a criteria is created using built-in visual criteria builder, which meas that this condition is met when&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Tax1&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;field of the printed invoice is not empty. When this criteria is met,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Visible&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;property of the attached element is changed to&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Yes&lt;/strong&gt;. If you will find SubBandTax1 band in the report and select it, you will see that its&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Visible&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;property is set to&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;No&lt;/strong&gt;. This means that this band is not printed by default. In the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Formatting rules&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;property of this band this rule (&lt;strong&gt;ruleTax1&lt;/strong&gt;) is applied. This allows to change Visible property of the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;SubBandTax1&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;band from&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;No&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;to&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Yes&lt;/strong&gt;, when&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Tax1&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;field of an invoice being printed is not empty.&lt;/p&gt;
&lt;p&gt;It is not required from you to remember how to use&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="uicontrol"&gt;IsNull&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;function - it can be picked-up from the list in the condition editor:&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-02-93/pastedimage1563352222018v4.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: reporting, designer, custom reports&lt;/div&gt;
</description></item></channel></rss>