PDA

View Full Version : Report with variable multiple lines per record



Kristie
October 29th, 2009, 11:49 AM
Hi, I have a report that looks like this:

11111111 name, customer branchname
019 100.00
DESCR: Name of company
*MSG alert on account
*MSG more messages
21111111 name, john branchname
019 400.00
DESCR: Name of company
019 15.00
019 4.00
DESCR: Name of company
31111111 customer, name branchname
019 1000.00
019 800.00
019 50.00
019 45.00
019 5.00
*MSG alert on account
*MSG more messages
*MSG even more messages

I am able to trap account, name, dollar amounts but I cannot get the "*MSG alerts".
I am using a detail trap to get the "019 dollar" and an append trap to get Account number, name, branch name.
Is it possible to get the msg alerts since they can be any distance from the account number and there can be more than one *msg per account?
Thanks in advance for any help.

Data Kruncher
October 29th, 2009, 12:10 PM
Hi Kristie,

You need a template that employs a "guru trap" (http://excelwithmonarch.com/extract/experimentation-produces-monarch-success) to pick up the messages properly.

I'd recommend building a single line template, and on the Advanced tab of the field definition, specify that MSG appears on the same line, and end the field on the end of left justification. That will give you all of the alerts in one field, but if you really want Alert1, Alert2, Alert3, etc., you can use the TextLine function (http://excelwithmonarch.com/functions/employing-functions-for-specialized-tasks#comment-11309) in a calculated field to isolate each alert message. Build as many as you think you'll need. Use the Duplicate feature to speed this work up nicely, changing the line number as necessary.

HTH,
Kruncher

Kristie
October 29th, 2009, 12:52 PM
Ahh the guru trap. I will give that a try, thanks so much.

OllyInMunich
October 29th, 2009, 02:36 PM
Hello Kristie, hello Kruncher,

It depends on how the data is going to be presented or treated at the end of the Monarch process, but you might want to look at using VorteXML for this kind of input.

This frees you from the tyranny of having to force the data into a table - when sometimes you just want a machine readable version of the report.

Bear in mind that VorteXML is limited to Monarch v5 Std input options, so you might need to prep the data in Monarch first to present a clean text summary for parsing.

Best wishes,

Olly