2 Replies Latest reply: May 15, 2014 10:00 AM by kellyera _ RSS

    help with a variable in a template

    kellyera _

      I read a few of your other threads, but have not been able to get the correct results and was wondering if you could provide me with any other options.  Here's a sample of my report:

      CLP771780699470.40*128016500079000130~              

      NM1QC1MOUSEMICKEYE*MI296308257~                  

      REFEA83224~                                               

      DTM05020080116~                                           

      DTM23220071219~                                           

      SVCHC>G012370.400311*1~                                 

      DTM47220071219~                                           

      CASCO125*70.4~                                            

      REF1S000~                                                 

      LQHEMA30~    

      CLP77163018349169.360*12800710866111*04911.9593~         

      CASOA23*8177.36~                                                     

      CASPIB13*992~                                                        

      NM1QC1DUCKDONALD***MI289389548~                              

      DTM05020080107~                                                      

      DTM23220071101~                                                      

      DTM23320071102~                                                               

      CLP106973217116391.0622.7612732460783200013*1~      

      NM1QC1MOUSEMINNIEL*MI293743521~                   

      NM1IL1MOUSEMINNIEJ*MI293743521~                     

      REFEA141621~                                              

      DTM05020071120~                                           

      DTM23220071012~                                           

      SVCHC>9928216391.060450*1~                              

      DTM47220071012~                                           

      CASPR2*22.76~                                             

      CASCO45*49.18~                                            

      REF1S422~                                                 

      AMTB6113.82~                                              

      LQHEN2~                                                                               

      /CODE

       

      The only data that I'm interested in is data located on the line starting with CLP and with data located on the line starting with LQ.  However, LQ does not appear on the report for every record.  I reviewed several other posts, and what I did was make the CLP line my detail line, and then make the LQ line an append line - then right clicked on the data to say "proceding string LQ".  It seemed to work, except it dropped down one line.  For example, using my report example above, the first account - for Mickey Mouse, has an LQ value of HE*MA30 - this is listed under the second account - for Donald Duck.

       

      Can you provide me with any more help?

       

      Thanks so much!

        • help with a variable in a template
          Grant Perkins

          Hi kellyera and welcome to the forum.

           

          Did you make your Append TRAP the same as your DETAIL trap?

           

          All appends are assumed to be trapped to relate the the next detail record AFTER the append trap - which is what you are seeing. If you make the Append trap the same as a detail trap you should get the results you want. So long as the last character of the trap for the append does not come after the last character of the trap for the detail, and in this case it shouldn't need to, then the concept of using the overlap and the preceding string should work fine as far as I can see from the sample data lines.

           

          Remember that the sample data in you trap definition does not matter at all - it is there as a guide for your fields painting requirements. (EXCEPT[/b] if you are using a floating trap where the data in the sample does become very important!)

           

           

          HTH.

           

           

          Grant