1 Reply Latest reply on Feb 21, 2011 3:06 PM by philmodjunk

    Conditional line printing



      Conditional line printing


      My database has records with a number of fields.  Two of these are FILED and COMMENT.  I want to set FileMaker to always print the first line, containing a selection of data.  If FILED is not empty, I want to follow with a line containg the FILED field.  If COMMENT is not empty, I want to follow with a line containing the COMMENt field.


      xxx xx xxxx xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx (COMMENT and FILED both empty)

      yyy yy yyyyy yyyyyyyyyyyyyyyyy yyyyyyyyyyyyyyyyyyyyyy ( COMMENT not empty but FILED is)

                Comment:  <contents of COMMENT field>

      zzz zz zzzzz zzzzzzzzzzzzzzzzz zzzzzzzzzzzzzzzzzzzzzz  ( Both COMMENT and FILED contain data)

                Filed: <contents of FILED field>

                Comment: <contents of COMMENT field>

      www ww wwww wwwwwwwwwwwwwww wwwwwwwwwwwwwwwwwww  ( COMMENT is empty but FILED is not)

                 Filed: <contents of FILED field>

      vvvv vvv vvvvv vvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvvv  ( COMMENT and FILED both empty)

      uuu uu uuuuu uuuuuuuuuuuuuuuu uuuuuuuuuuuuuuuuuu  (...)

      Any assistance would be greatly appreciated.  The database is excellent, but the help facility leaves much to be desired,

        • 1. Re: Conditional line printing

          If you use a calculation field to produce lines 2 and 3 for each record, you can define a calcuation field that is empty when FileD and Comment are empty respectively. Then you can set slide up/also resize enclosing part to remove the blank space when you print or preview the report. The sliding will not be visible in browse mode.

          Here's a sample calcluation for the FileD line:

          If ( Not IsEmpty ( FileD ) ; "Filed: " ; "" )