1 Reply Latest reply: May 15, 2014 10:04 AM by Grant Perkins RSS

    The Sometimes 2nd Line


      A report sometimes generates a second line for a record and I have trouble trapping its data. Appearance is:

      TTTTT TT TT <-more data here--


                                          XXXXX XXXXXXX  XXXXXX

      I have a detail template, trapping on the 1st set of T's; an append template, trapping on the same set (using that special method). The data represented by the X's may or may not be present on an append line. The line has no fixed preceding string or following string that I can use in Field/Advanced. At present, what I've set up has caused the appended lines to be tied to the record preceding the one to which it belongs. Other than define both lines in one field using multiple line, and then parsing them out, is there any other way to tame this beasty? BTW, if the report does NOT generate a line 2, a new detail line (all the T's) immediately follows with no blank lines intervening.

        • The Sometimes 2nd Line
          Grant Perkins

          Try this slight variation on what you have already done.


          Detail line trap as you already have it.


          Append trap as you have it - the same as the detail so that it always resets for each new detail line - BE SURE TO MAKE THE SAMPLE JUST A SINGLE LINE, NOT 2 LINES.


          Paint a field for the entire width of the page (or the max width of your sometime second line if that is smaller.) Make the field a multiline field using 'End on' "None of the Above" in the advanced field properties.


          Save that.


          Check your Table results. Your Append field should have 'full width' text from either 1 or 2 lines. (Be sure to make the displayed width wide enough to see the second line included or use the "Show Field Contents" option from the "Window" menu.


          Create a calculated field using the TEXTLINE() function and indicate you only want line 2 of the multi-line field. Now you should be close to what you need if you hide the original append field. Lines with no second line will return an empty field.


          If you need the contents of the second line split into individual fields just slice and dice the result of the textline separation using the most appropriate functions based on the line structure or content. More suggestions available for this if you are not alreay familiar with slice and dice - I can't remember if it is something that you have covered before.