rawdevelopment Posted November 30, 2011 Share Posted November 30, 2011 In the code below I am returning information in a table format while also returning a graphic resource for many products. The code will somewhat the same for 40+ products in a text field. The graphic lines up with each following graphic according to the text lines returned. Is there a way to return blank lines of text to maintain positioning according to the graphic based on lets say 5 line items but only 2 are selected. if (Field("MepilexAg") == "Yes, with Facility Order Numbers") return '<p style="(no style)" quad="L" leading="-775" rindent="0" leadbefore="0" leadafter="0" widows="2" kerning="true" hyphenate="false" skipifempty="false" skipifemptyvar="false" noparabreakoncopyfit="false">' + '<f name="MHC Din Regular">' + '<p leading="0">' + '<table columns="3" alignment="left" margins="top:30;bottom:20;left:200" cellshading="MHC Green,0" columnrules="freq:3;default:thin,White" rowrules="freq:100;default:thin,White" headerrules="separator:thin,White" headershading="MHC Green,25" indents="left:100">' + '<column width="6700">' + '<column width="12800">' + '<column width="7200">' + '<row type="header">' + '<cell>' + '<z newsize="10">' + " " + '<z newsize="8">' + "MHC Product #" + '<cell>' + '<z newsize="10">' + " " + '<z newsize="8">' + "Size" + '<cell>' + '<z newsize="10">' + " " + '<z newsize="8">' + Field("OrderNumberLabel") + '<z newsize="10">' + '<f name="MHC Din Light">' + Rule("RuleMepAG287100") + Rule("RuleMepAG287200") + Rule("RuleMepAG287300") + Rule("RuleMepAG287400") + Rule("RuleMepAG287500") + '</table>'; else return '<p style="(no style)" quad="L" leading="-775" rindent="0" leadbefore="0" leadafter="0" widows="2" kerning="true" hyphenate="false" skipifempty="false" skipifemptyvar="false" noparabreakoncopyfit="false">' + '<f name="MHC Din Regular">' + '<p leading="0">' + '<table columns="2" alignment="left" margins="top:30;bottom:20" cellshading="MHC Green,0" columnrules="freq:3;default:thin,White" rowrules="freq:100;default:thin,White" headerrules="separator:thin,White" headershading="MHC Green,25" indents="left:100">' + '<column width="6700">' + '<column width="12800">' + '<row type="header">' + '<cell>' + '<z newsize="10">' + " " + '<z newsize="8">' + "MHC Product #" + '<cell>' + '<z newsize="10">' + " " + '<z newsize="8">' + "Size" + '<z newsize="10">' + '<f name="MHC Din Light">' + Rule("RuleMepAG287100") + Rule("RuleMepAG287200") + Rule("RuleMepAG287300") + Rule("RuleMepAG287400") + Rule("RuleMepAG287500") + '</table>'; Link to comment Share on other sites More sharing options...
step Posted November 30, 2011 Share Posted November 30, 2011 Assuming you're trying to return a blank line for instances when your rules (i.e. "Rule("RuleMepAG287100")") return a null value, this might help you: var 100 = (Rule("RuleMepAG287100") != "") ? Rule("RuleMepAG287100") : " "; var 200 = (Rule("RuleMepAG287200") != "") ? Rule("RuleMepAG287200") : " "; var 300 = (Rule("RuleMepAG287300") != "") ? Rule("RuleMepAG287300") : " "; var 400 = (Rule("RuleMepAG287400") != "") ? Rule("RuleMepAG287400") : " "; var 500 = (Rule("RuleMepAG287500") != "") ? Rule("RuleMepAG287500") : " "; if (Field("MepilexAg") == "Yes, with Facility Order Numbers") return '<p style="(no style)" quad="L" leading="-775" rindent="0" leadbefore="0" leadafter="0" widows="2" kerning="true" hyphenate="false" skipifempty="false" skipifemptyvar="false" noparabreakoncopyfit="false">' + '<f name="MHC Din Regular">' + '<p leading="0">' + '<table columns="3" alignment="left" margins="top:30;bottom:20;left:200" cellshading="MHC Green,0" columnrules="freq:3;default:thin,White" rowrules="freq:100;default:thin,White" headerrules="separator:thin,White" headershading="MHC Green,25" indents="left:100">' + '<column width="6700">' + '<column width="12800">' + '<column width="7200">' + '<row type="header">' + '<cell>' + '<z newsize="10">' + " " + '<z newsize="8">' + "MHC Product #" + '<cell>' + '<z newsize="10">' + " " + '<z newsize="8">' + "Size" + '<cell>' + '<z newsize="10">' + " " + '<z newsize="8">' + Field("OrderNumberLabel") + '<z newsize="10">' + '<f name="MHC Din Light">' + 100 + 200 + 300 + 400 + 500 + '</table>'; else return '<p style="(no style)" quad="L" leading="-775" rindent="0" leadbefore="0" leadafter="0" widows="2" kerning="true" hyphenate="false" skipifempty="false" skipifemptyvar="false" noparabreakoncopyfit="false">' + '<f name="MHC Din Regular">' + '<p leading="0">' + '<table columns="2" alignment="left" margins="top:30;bottom:20" cellshading="MHC Green,0" columnrules="freq:3;default:thin,White" rowrules="freq:100;default:thin,White" headerrules="separator:thin,White" headershading="MHC Green,25" indents="left:100">' + '<column width="6700">' + '<column width="12800">' + '<row type="header">' + '<cell>' + '<z newsize="10">' + " " + '<z newsize="8">' + "MHC Product #" + '<cell>' + '<z newsize="10">' + " " + '<z newsize="8">' + "Size" + '<z newsize="10">' + '<f name="MHC Din Light">' + 100 + 200 + 300 + 400 + 500 + '</table>'; Link to comment Share on other sites More sharing options...
rawdevelopment Posted December 1, 2011 Author Share Posted December 1, 2011 The blank record would need to return after the last record so if record/row 3 is set to "No" not to return then record/row 4 and 5 will move up in the table while the table still maintaining the 5 rows with the last one being empty. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.