10 Replies Latest reply: May 15, 2014 10:11 AM by Olly Bond RSS

    Multi-row trap

    Shutson _

      I have a multi-row trap - could be 2 rows, could be 4.  The first row is broken up into various fields, the second and succeeding rows (if any) are all 1 field which I unpack into various fields.  The 3rd and 4th rows always have the full name and sometimes the address.  If the addresses are not present it picks up all lines, but if the addresses are there it won't pick up the last line, I think because it hits the 254 character limit.  Any suggestions?

        • Multi-row trap
          elginreigner _

          Can you post some data, it would really help? Without data, it's be hard to speculate.

           

          I'm assuming the trap contains lines 2 through 4 rows in the same trap. What data type are you using for lines 3 and 4? You may want to use the memo type on line 2 and capture all 3 lines and use your strip functions to gather the needed information.

            • Multi-row trap
              Olly Bond

              Hello Shutson,

               

              If you trap on line 1, and then define a field on line which has, in the Advanced tab of the Field Properties dialog, a setting that it ends on "none of the above", then this field will continue until the next occurence of a template. Sounds like you might be using the "Blank field values" setting instead, from the description.

               

              HTH,

               

              Olly

                • Multi-row trap
                  elginreigner _

                  Hello Shutson,

                   

                  If you trap on line 1, and then define a field on line which has, in the Advanced tab of the Field Properties dialog, a setting that it ends on "none of the above", then this field will continue until the next occurence of a template. Sounds like you might be using the "Blank field values" setting instead, from the description.

                   

                  HTH,

                   

                  Olly[/QUOTE]

                   

                  did not think of that as it requires someone to select it.

                    • Multi-row trap
                      Shutson _

                      Thanks for the input.  Ollie, I am using the "End field on nonblank preceding string of 1 character" setting as there are dotted lines between the entries.  I can't find any other setting that eliminates these.  However, I still can't get all the rows selected.

                        • Multi-row trap
                          Olly Bond

                          Hello Shutson

                           

                          Sometimes reports don't let you get everything perfect in the Report window, and it sounds like this is one of those. Change the setting to "none of the above", and in the Table window create a calculated field:

                           

                          Extract(;"";"- - -")

                           

                          If your dashes are like that, this should do the trick.

                           

                          Best wishes

                           

                          Olly

                          • Multi-row trap
                            Shutson _

                            0123456789 S01 AC99/2 Smith, Joe P 1/1/10 12/1/09 14.77 W06,W47,W08

                                       123-45-6789 01/01/1970 Joe P Smith,123 Valley Way,Yourcity,ST,12345-1234

                               JTWR 000-00-0000 08/27/1991 Susan R Smith,123 Main St,Yourcity,ST,12345-1234

                               JTWR 000-00-0000 11/21/1952 Charles G Smith,123 Main St,Yourcity,ST,12345-1234

                            -


                            /Code

                             

                            This is a sample of the most data I could have.  I may only have the first two lines, or the third/fourth lines may not have addresses.  If the third/fourth lines do not have addresses, all 4 rows are selected.

                              • Multi-row trap
                                Grant Perkins

                                [Code]

                                0123456789 S01 AC99/2 Smith, Joe P 1/1/10 12/1/09 14.77 W06,W47,W08

                                           123-45-6789 01/01/1970 Joe P Smith,123 Valley Way,Yourcity,ST,12345-1234

                                   JTWR 000-00-0000 08/27/1991 Susan R Smith,123 Main St,Yourcity,ST,12345-1234

                                   JTWR 000-00-0000 11/21/1952 Charles G Smith,123 Main St,Yourcity,ST,12345-1234

                                -


                                /Code

                                 

                                This is a sample of the most data I could have.  I may only have the first two lines, or the third/fourth lines may not have addresses.  If the third/fourth lines do not have addresses, all 4 rows are selected.[/QUOTE]

                                 

                                I think you may be right about the 254 character limit. I assume that when you say the Third/Fourth line addresses don't appear you mean that at some point the data string form the multiline field is truncated. Or are you saying that the lines with names and addresses both appear but only the address part of each is missing?

                                 

                                Setting the field as a MEMO type will deal with the charater limit but bear in mind that the field DISPLAY width defined may come into play somewhere. For large fields it is usually good to use the 'Show field Contents' options or play with the onscreen field sizes in the table window.

                                 

                                You may have done this already and not resolved the problem but I could not be sure form the problem description so I thought it worth mentioning in order to ensure we had not missed something simple.

                                 

                                Grant

                                  • Multi-row trap
                                    Shutson _

                                    thanks, Grant.  When the third/fourth lines have addresses, it only picks up the third line and not the fourth. 

                                     

                                    When I use field type Memo, I still can only set display width and template width to 254, nothing higher.  Also, where would I find the "Show field Contents" option - I couldn't find it.

                                      • Multi-row trap
                                        Shutson _

                                        Found it.  I'll see what I can do with that.

                                          • Multi-row trap
                                            Olly Bond

                                            Hello Shutson,

                                             

                                            Memo fields allow for 32767 characters, so you should be OK. Another option would be to define a null footer template on the dashed lines just used to stop the Detail template memo field from including these. You might also want to explore Textline(;n) to see how that can chop up multi-line fields into single lines.

                                             

                                            If you do need to attack data wider that 254 characters in a single line, then define Field1 and Field2 etc along the line, and create FieldX as a calculated field as:

                                             

                                            textline(Field1;1)textline(Field2;1) etc.

                                             

                                            HTH,

                                             

                                            Olly