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

    Using an append template?

    guyfromri _

      Hey everyone! I haven't really been posting that much but recently, I found a use for monarch in my programs again and I'm having an issue. I have a report that has odd amounts of data. By this I mean, I'm extracting patients. The first line is always the patient name and number. Then the address. I have a detail set up to trap these. Then in some cases, patients have insurances listed below the address. I'm trying to use an append template to capture that data.


      :confused:MY ISSUE::confused: The append template I'm using is appending the data to the patient below the insurance lines, not above. Is there a way I can switch which direction it appends the data or am I just doing something wrong?


      I'm working with Monarch 7.00 and VB6



      As always, thank in advance!!

        • Using an append template?
          Grant Perkins



          The core rule for an Append template is that it captures date from ABOVE the record(s) it will relate to - which is what you are seeing.


          You could consider using a Footer template but back in V7 the Footer template functionality was somewhat more specific to things like footers than it is these days!


          I think what you may need it the 'guru trap' concept. At a basic level this is a method of creating a genuine Append template but one that will seek its data wherever it can find it - which may be below the Detail record to which the append is related.


          Now, there are a large number of posts that relate to this approach and I suspect if you run a search through the forum you will find one that very closely matches what you are seeking to do - it sounds sort of familiar. I suggest the search because if there is a nearly identical example you will recognise it whilst I will not.


          The core of the concept is that you define a trap for the append that (usually) exactly matches the trap you use for the detail records and then grab the fields using something that can uniquely identify them - e.g. a preceding string set up in the advanced properties of the field(s) - so that any corresponding data between the trap and the start of the next detail record (the append trap will also get 'reset' at the next record) will be picked up even if it is not always in the same relative row.


          If you can't find anything let us know.


          There is a further outline description of the 'guru trap' [URL="http://********************/extract/experimentation-produces-monarch-success"]here[/URL] - about mid-way through.