1 Reply Latest reply: May 15, 2014 9:57 AM by Grant Perkins RSS

    Template problem with irregular account records

    DennisD _



      I've recently been introduced to Monarch. I am using Version 8 Pro. I have a report of our ATM cardholders that contains 9 standard lines of information in a uniform structure for each card. Just below that there is provision for the accounts linked to that card in this format:


      1st 9 lines of info


      CK1          123456789

      SV1          123456789


      The problem is this - sometimes a cardholder has only a checking or only a savings account so that  there is only one line and not two.


      What is happening in table view is that if a cardholder has a CK1 and not a SV1 as well, the trap is looking to the next SV1 in the report.


      I built an append template for each CK and SV

      My trap looks like this since there could be the numerical portion can be a 1 or a 2:


      To trap checking accounts



      CK1          123456789

      SV1          123456789


      To trap savings accounts



      CK1          123456789

      SV1          123456789

      When it tried to change the trap to AAN, I only managed to retrieve the first account and not the second.


      Is there something wrong with the trap

      construction of is the the layout of the data?


      Thanks in advance for any help!



        • Template problem with irregular account records
          Grant Perkins

          Hi Dennis,


          If these lines are below the maion 9 line record I assume you are flagging the template as a FOOTER.


          Do you always have either one or two lines for these accounts? Are there ever NO ACCOUNTS or more than two lines?


          Are there always at least 2 lines , even if one is blank, between the start of what I will call the footer area and the first part of the first template related to the next record?


          Are the Account numbers always going to start with CK or SV? (Or something equivalent if that is a dummy reference.)


          Assuming for now that there is always at least one record and that you can trap the line cleanly, try this out.


          In addition to you detail template edine a footer template and trap on something like the AAN if that makes it unique from the detail records template.


          Make the data sample 2 lines long. (If there can be 3 or more accounts this needs to change but let's deal with that if it happens.)


          In the first row of the field definition area for the template paint a field where the account number will appear across the row. Right click on the field to get to the properties and click on the advanced tab. In the 'Start Field On' section use 'Preceding String          in current Line' option and enter "CK1". Call the field "Checking Account" or something suitable. If some of the account may start CK2 or whatever, just use CK as the preceding string and include the numeric value in the field being created.


          On the next line repeat this but use SV as the preceding string.


          The footer will now pick up a field for CK where a CK account number exists, SV is an SV number exists and both if they both exist.


          If a client has 2 CK or SV accounts you are likely to have a problem.  The footer template must have as many rows in the data sample area as there might be account numbers BUT it must NOT exceed the minimum number of rows, including blank rows, from the start row of the footer definition to the first row of the next detail record or append template, if there is one,  for the next record.


          I hope all of that makes sense. It is a lot easier to do than to describe!


          If it does not make sense let me know. Likewiase if it does not work let me know but I would need to know what the problem is in both cases if a further useful suggestion is to mean anything.    


          Good luck.