methogod Posted March 31, 2023 Share Posted March 31, 2023 return ((Field ("issue_date")+"<t><t>"+Field("check_number")+"<t><t>"+Field("check_amount")+"<br>"+ Field ("issue_date2")+"<t><t>"+Field("check_number2")+"<t><t>"+Field("check_amount2")+"<br>" +Field ("issue_date3")+"<t><t>"+Field("check_number3")+"<t><t>"+Field("check_amount3")+"<br>" +Field ("issue_date4")+"<t><t>"+Field("check_number4")+"<t><t>"+Field("check_amount4")+"<br>" +Field ("issue_date5")+"<t><t>"+Field("check_number5")+"<t><t>"+Field("check_amount5")+"<br>" +Field ("issue_date6")+"<t><t>"+Field("check_number6")+"<t><t>"+Field("check_amount6")+"<br>" +Field ("issue_date7")+"<t><t>"+Field("check_number7")+"<t><t>"+Field("check_amount7")+"<br>" +Field ("issue_date8")+"<t><t>"+Field("check_number8")+"<t><t>"+Field("check_amount8")+"<br>" +Field ("issue_date9")+"<t><t>"+Field("check_number9")+"<t><t>"+Field("check_amount9")+"<br>" +Field ("issue_date10")+"<t><t>"+Field("check_number10")+"<t><t>"+Field("check_amount10")+"<br>" +Field ("issue_date11")+"<t><t>"+Field("check_number11")+"<t><t>"+Field("check_amount11"))) Suppress if empty doesn't work nor does suppress if empty variable tried it as CODE but that rule wants to consider TABS <t> as NON EMPTY... whats an easy solution? Quote Link to comment Share on other sites More sharing options...
Douglas Cogan Posted March 31, 2023 Share Posted March 31, 2023 Hi, the issue is that the <br> tag makes a new line in the same paragraph. Skip if empty only skips the whole paragraph, so it won't skip just a line. But I think you want this: var retstr=""; for (i=1;i<=11;i++) { if (Len(Trim(Field("issue_date"+i))) > 0 && Len(Trim(Field("check_number"+i))) > 0 && Len(Trim(Field("check_amount"+i))) > 0) retstr += Field ("issue_date"+i)+"<t><t>"+Field("check_number"+i)+"<t><t>"+Field("check_amount"+i)+"<br>" } return retstr; I think that will work. I can't test this since I don't have your fields, and hopefully the parentheses match up. This will skip if any of issue_date or check_number or check_amount are empty. If you only want to skip if all of them are empty change the && to || above. 1 Quote Link to comment Share on other sites More sharing options...
methogod Posted March 31, 2023 Author Share Posted March 31, 2023 this works, any way to make it return check amount as a $XXX.XX format? Quote Link to comment Share on other sites More sharing options...
Douglas Cogan Posted April 1, 2023 Share Posted April 1, 2023 Yes, replace this line: retstr += Field ("issue_date"+i)+"<t><t>"+Field("check_number"+i)+"<t><t>"+Field("check_amount"+i)+"<br>" with this: retstr += Field ("issue_date"+i)+"<t><t>"+Field("check_number"+i)+"<t><t>"+FormatNumber("$###,###.00", Field("check_amount"+i))+"<br>"; That will put in leading dollar signs, commas at the thousands place and force two zeros after the decimal. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.