{"id":556,"date":"2024-05-03T06:03:44","date_gmt":"2024-05-03T06:03:44","guid":{"rendered":"http:\/\/www.exploreax.com\/blog\/?p=556"},"modified":"2024-05-03T06:03:44","modified_gmt":"2024-05-03T06:03:44","slug":"electronic-reporter-new-line-in-a-word-template-content-control","status":"publish","type":"post","link":"http:\/\/www.exploreax.com\/blog\/blog\/2024\/05\/03\/electronic-reporter-new-line-in-a-word-template-content-control\/","title":{"rendered":"Electronic reporter: New line in a word template content control"},"content":{"rendered":"\n<p>Anyone who had used Electronic Reporter especially for precision design work will know that there are many frustrating challenges that one encounters on a day by day basis. One of these that recently got me stuck for a while was using a new line character in a content control.<\/p>\n\n\n\n<p>Scenario: I had a word table with a selection of content controls across various cells. In the first cell however i had 2 content controls of which one of them was optional based on the data filled in. The idea was that there shouldn&#8217;t be a blank space or line after the first control if there isnt data in the second field. E.G.<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2024\/05\/image-2.png\"><img decoding=\"async\" loading=\"lazy\" width=\"593\" height=\"87\" src=\"http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2024\/05\/image-2.png\" alt=\"\" class=\"wp-image-559\" srcset=\"http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2024\/05\/image-2.png 593w, http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2024\/05\/image-2-300x44.png 300w\" sizes=\"(max-width: 593px) 100vw, 593px\" \/><\/a><\/figure>\n\n\n\n<p>If the data for the second control is present then it needs to appear below the first value E.G.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2024\/05\/image.png\"><img decoding=\"async\" loading=\"lazy\" width=\"583\" height=\"110\" src=\"http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2024\/05\/image.png\" alt=\"\" class=\"wp-image-557\" srcset=\"http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2024\/05\/image.png 583w, http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2024\/05\/image-300x57.png 300w\" sizes=\"(max-width: 583px) 100vw, 583px\" \/><\/a><\/figure>\n\n\n\n<p>The easiest solution would obviously be to include a new line between the content controls E.G.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2024\/05\/image-3.png\"><img decoding=\"async\" loading=\"lazy\" width=\"575\" height=\"170\" src=\"http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2024\/05\/image-3.png\" alt=\"\" class=\"wp-image-560\" srcset=\"http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2024\/05\/image-3.png 575w, http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2024\/05\/image-3-300x89.png 300w\" sizes=\"(max-width: 575px) 100vw, 575px\" \/><\/a><\/figure>\n\n\n\n<p>However this would result in a permanent line regardless of whether the second content control has a value which is not ideal. <\/p>\n\n\n\n<p>The second option would be to include a CHAR(10) in the data being passed to the second content control from electronic reporter E.G. IF(@.SubValue &lt;> &#8220;&#8221;, CHAR(10) &amp; @SubValue, &#8220;&#8221;). However this did not work off the bat for me as there are two additional changes that needed to happen as well. <\/p>\n\n\n\n<ol>\n<li>On the table in word the &#8220;Wrap text&#8221; option must be selected<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2024\/05\/image-7.png\"><img decoding=\"async\" loading=\"lazy\" width=\"422\" height=\"445\" src=\"http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2024\/05\/image-7.png\" alt=\"\" class=\"wp-image-564\" srcset=\"http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2024\/05\/image-7.png 422w, http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2024\/05\/image-7-284x300.png 284w\" sizes=\"(max-width: 422px) 100vw, 422px\" \/><\/a><\/figure>\n\n\n\n<ol>\n<li>On the content control in word, the &#8220;Allow carriage returns (multiple paragraphs)&#8221; option but me checked as well<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2024\/05\/image-6.png\"><img decoding=\"async\" loading=\"lazy\" width=\"325\" height=\"386\" src=\"http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2024\/05\/image-6.png\" alt=\"\" class=\"wp-image-563\" srcset=\"http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2024\/05\/image-6.png 325w, http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2024\/05\/image-6-253x300.png 253w\" sizes=\"(max-width: 325px) 100vw, 325px\" \/><\/a><\/figure>\n\n\n\n<p>The second step was the most obscure to me as many websites have pointed to the first step but never mentioned the second. I hope this will help someone in the future.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Anyone who had used Electronic Reporter especially for precision design work will know that there are many frustrating challenges that one encounters on a day by day basis. One of these that recently got me stuck for a while was using a new line character in a content control. Scenario: I had a word table&hellip;<a href=\"http:\/\/www.exploreax.com\/blog\/blog\/2024\/05\/03\/electronic-reporter-new-line-in-a-word-template-content-control\/\">Read more <span class=\"screen-reader-text\">Electronic reporter: New line in a word template content control<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[112,118,116],"_links":{"self":[{"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/posts\/556"}],"collection":[{"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/comments?post=556"}],"version-history":[{"count":1,"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/posts\/556\/revisions"}],"predecessor-version":[{"id":565,"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/posts\/556\/revisions\/565"}],"wp:attachment":[{"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/media?parent=556"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/categories?post=556"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/tags?post=556"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}