12 Replies Latest reply: May 15, 2014 9:58 AM by John D. Brown RSS

    Creating mutiple line detail field

    John D. Brown

      I have a report that has detail descriptions of varying number of lines that I want to capture in a field called "Detail". "General Description" is always in the same place. e.g.:

       

                  General Description

       

      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

       

                  General Description

      XXXXXXXXXXXXXXXXXXXXXXXXXX

       

                  General Description

      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

       

      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

       

      I read many post about multiple lines, but I am not getting it!? I am using Monarch V8.

       

      I used to think I was pretty smart  

        • Creating mutiple line detail field
          Ontiveros _

          I think you need to give more information as to what is below that line in order to trap fields.

          • Creating mutiple line detail field
            Grant Perkins

            Looks innocuous doesn't it but assuming the samples you have provided are for a purpose you seem to be dealing with something that has the potential for variable start line positions under the 'header' trap and the possibility of multiple 'paragraphs' (or data sets?).

             

            That could make it rather interesting to define a start and end point for a multi-line field in relation to the 'header' and using the facilities available in the advanced tab of the field properties.

             

            Is this the problem you are experiencing or is it something else?

             

            You mention reading many posts but have you also followed the information in the Help section (and/or Training Guide) as a starting example?

             

            If your report does have the variations shown you may need to do something like the following.

             

            Start to define the template by using a 2 line sample of the report, the first of those lines being the one with "General Description" on it.

             

            Trap on "General Description" in line 1.

             

            On line 2 paint a field the width of the report(or the width of the field if less). Make this a MEMO field type.

             

            Right mouse click on the field and go to the Advanced Properties.

             

            Set "Start FIELD on" and enter "General Description" in the box for 'String on preceding line'.

             

            Set "End field on" to something that will work for the entire report. Probably "None of the Above". BUT the report may look a little different in the print to the way ou have presented it for this question so other possibilities may be available. I would suggest experimenting but check the entire report carefully to ensure that everything is being extracted correctly before making use of the result.

             

            This is a suggestion made without testing the theory, so if it doesn't work for you let us know in what way it failed and we can try to refine things from there.

             

            HTH.

             

            Grant

            • Creating mutiple line detail field
              John D. Brown

              Here is what the proceeding and following lines look like:

              ZZ ABC 1234 - Stuff for this

                            goes here

              PARAMETERS - Stuff goes here

              General Description

              XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

              XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

               

              ZZ ABC 5678 - Stuff

              (repeats from here)

              • Creating mutiple line detail field
                Grant Perkins

                Originally posted by John D. BRown:

                Here is what the proceeding and following lines look like:

                ZZ ABC 1234 - Stuff for this

                              goes here

                PARAMETERS - Stuff goes here

                General Description

                XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

                XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

                 

                ZZ ABC 5678 - Stuff

                (repeats from here) /b[/quote]What are you using as your DETAIL section?

                 

                Alternatively, do all records always have a GENERAL DESCRIPTION entry at the bottom of the record and immediately before the start of the next record? And is there always a gap of one line betwen the end of the GENERAL DESCRIPTION section and the first line of the next record set or can there sometimes be no lines or more than one line?

                 

                 

                Grant

                • Creating mutiple line detail field
                  John D. Brown

                  General Description

                  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

                  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

                   

                  The section above is the detail and yes there is a new section after each detail, except for the very last record.

                   

                  There is one or more blank lines after each General section.

                  • Creating mutiple line detail field
                    Grant Perkins

                    John,

                     

                    working with the examples you have posted this works for me.

                     

                    For the detail trap. Use a 2 row sample.

                     

                    Trap on

                     

                    "General Description"

                     

                    Paint a field on the second row wide enough to capture all the text field. The field should be a MEMO type.

                     

                    Right click on the field to get to the Advanced Properties.

                     

                    Set the "End field on" to one of the options shown. I think the last one - 'None of the above'  is the one that is appropriate here. It is most likely to be correct when you have multiple paragraphs to extract from the text area.

                    The usual defined limit would be using blank field values but in this case would probably  only work where you could guarantee that there was never any likelihood of there being more than one blank line between paragraphs AND the would always be at least 2 blank lines between records, i.e. the end of the text section and the next line starting ZZ ABC 1234. If that was the case then a value of 2 in the blank field values should work, but it would all need to be 100%consistent.

                     

                    The data above the Detail Description lines can, I assume, be captured in an append template.

                     

                    It may be possible to capture everything in a single detail template if that would be any help.

                     

                     

                    If you have any difficulties correctly positioning the text extraction field  try this:

                     

                    Set "start field on" to "String: 'general description' anywhere in the previous line". This should not be necessary or applicable csince the text is your detail and the "general description" string is the trap. It might be useful if you decide to work in a slightly different way (like capturing everying in a single detail record), so I offer it as a suggestion in case there are some odd situations that have not appeared yet where this concept may help.

                     

                    Have fun and please let us know how you get on.

                     

                    Grant

                    • Creating mutiple line detail field
                      John D. Brown

                      Why does everything fall apart when a field crosses a page break?

                      • Creating mutiple line detail field
                        Grant Perkins

                        Originally posted by John D. Brown:

                        Why does everything fall apart when a field crosses a page break? /b[/quote]Because Page Breaks tend to create situations which make your 'rules' for a template not work.

                         

                        However, if you create a template for a Page header that defines the lines that appear in page headers - extra blanks, text lines, whatever - EVEN IF YOU DON'T WANT TO CAPTURE ANY OF THE DATA - then the other Monarch templates will skip ocver the Page Header template as if it is invisible and should solve you problem UNLESS you have something strange happening or you page headers are inconsistent.

                         

                        Hope this helps.

                         

                        Grant

                        • Creating mutiple line detail field
                          John D. Brown

                          Monarch is putting the page breaks in. The text file has one header line at the beginning of the file. Monarch is putting the page break in after 256 lines. I want to totally eliminate the page break. Force Page Break Look Ahead is set to a(10) in the registry, but I do not know what Monarch needs to supress a page break it is creating.

                           

                          Thanks

                          • Creating mutiple line detail field
                            Grant Perkins

                            Originally posted by John D. Brown:

                            Monarch is putting the page breaks in. The text file has one header line at the beginning of the file. Monarch is putting the page break in after 256 lines. I want to totally eliminate the page break. Force Page Break Look Ahead is set to a(10) in the registry, but I do not know what Monarch needs to supress a page break it is creating.

                             

                            Thanks /b[/quote]Possibly the easiest thing to do, if the records in the file will help you, is to choose something to be a page break where you can be sure there will be a break in less than 256 lines for each record. You could make each record a page for example - if you can find something to act as the page 'break'.

                             

                            I seem to recall finding another way as well but it was a while ago and the details do not come immediately to mind. If this suggstion does not help I will see if I can remember how the other approach came to my attention.

                             

                             

                            Grant

                            • Creating mutiple line detail field
                              Grant Perkins

                              Originally posted by Grant Perkins:

                              Possibly the easiest thing to do, if the records in the file will help you, is to choose something to be a page break where you can be sure there will be a break in less than 256 lines for each record. You could make each record a page for example - if you can find something to act as the page 'break'.

                               

                              /b[/quote]Just to add to that thought - the first line of each record might do the job as a logical (but not physical) 'Page Header' template for you. Not a complete solution if any of the records are more than 256 lines though.

                               

                              On the other hand I am beginning to wonder why a required page break at 256 lines is causing you a problem - unless you have defined the Report header as a Page Header template. If you need info from the Report Header to go with each record that is fine but treat it as an append template and not a Page Header template.

                               

                              If none of these suggestions seem to help I think we are at the stage where it will be time to ask if you can make a sample file available to play with so that the problems can be looked at interactively.

                               

                              HTH.

                               

                               

                              Grant

                              • Creating mutiple line detail field
                                John D. Brown

                                Viola! I set the Report Header as a page break!

                                 

                                Thanks!