Hi Corey and welcome to the forum!
Is your sample data a single record with, in this case, Billing information that is not populated but can be populated in other records?
Are all the lines consistent EXCEPT the number of lines in an address section (Either the first address or the Billing Address I assume may have different numbers of lines from record to record.)
I have some ideas but it will be easier to explain with answers to the above questions.
First, thank you from myself and my CIO.
Any information below the first Fax field can be ignored. It is not populated in the dictionary this report is coming from.
And you are correct. The ADDRESS information only varies by the number of lines. The phone and fax lines will always follow. Additional ADDRESS examples:
Anytown, ST 66666
Anytown, ST 66666
Anytown, ST 66666
Here are some suggestions. Please note that in part some of them are based on the apparent simplicity of the report and I have cut a few corners that would not often be cut.
In particular the address data is a little unusual in that it is not clearly differentiated from other information - often addresses are printed indented for example or have a blank line after them. This makes them easier to separate from other data. Not here though so I have planned to use a slightly different approach to normal.
You will need 2 templates. A detail template and a footer template.
For the detail template you may as well trap on "Tax ID:" as I expect you do now.
Make the sample 4 rows long so it just includes the first line of the address. (I have assumed the first line of the address is always row 4. If it is not we may need to tweak this a little.)
Paint the field for Tax ID, Provider Group and, on the 4th row, a field wide enough for the widest line of the address. Right click on the field just created and and set the properties in the Advance Properties tab to 'End Line on "None of the above." This will provide a multi-line field fo rthe address. It would be better if we could define clearly where it will end using one of the other 'End on ' options, but we can't. So we will use a footer template to mark the end of the address in this particular example.
Save the template.
Now select a new data sample that starts from the 'Phone:' tag under the address and stretches to the end of the unused fields under Billing Address.
Create a new template, make it a Footer type, and trap on "Phone:". It will only find the first occurrence per record.
Create the phone number and fax fields.
Save the template. Double check that there are no anomalies in the report that might lead to the footer being wrongly associated with more than one record above it.
You should now have all the fields you need except that the address will all be in one field in the table. At this point you may want to read up on "Address Blocks" in the help if you have not already used them.
From the table window, go to "Data > Address Blocks"
Create a NEW Address block definition with whatever name you wish. Select the postal formats your report may contain as the next option.
A word of warning at this point.
Addresses in databases are NEVER 100% accurate - unless you have very few addresses perhaps. You can expect some anomalies somewhere, probably quite a few. Don't get hung up on that.
From the available field on the next screen select your 'address' field to be the 'selected' option. Then in the Output Fields screen choose the fields you want to see. Be sure to include the Error field - Monarch trying to tell you it has processed a record that seems not to obey all the rules. Very useful for identifying the anomalies you will get.
I won't try to describe the Address Block feature in detail - you can quickly experiment and see what you get from your data. Your second post example suggests you will get City, Region and Postal Code OK. You seem to have 2 address lines max. so tick for one and two at least, maybe 3?
I would guess that the "c/o facility" is not really an address line but it will be as far as address blocks are concerned. A decision about trying to tidy that up and how one might approach that need is probably best left out for now until you can see how important such an activity might be for what you are being asked to provide. Always assuming that the information that is in the original report offers any correction rules that could be reliably implemented ...
Right, see how you get on with that and be sure to post back with any questions but especially to report your success!
After putting the model together as you had indicated, I still had the issue of the phone number from one record being put into the phone number of the next record. I re-entered the model a couple of times to ensure I was putting in correctly and the outcome was the same. So I tried making the phone and fax a detail line and the tax id, group name, and address a page header. As I am very technically un-educated when it comes to Monarch, I will say that it simply worked. All the data is appearing as it should in the proper fields, the address block is good, and I am not missing any entries (only 163 entries in the database).
There is not enough room in this block to say how much I appreciate your assistance. So a simple Thank You will have to do.
Glad you have a result but I have some slight concerns that by using the Phone as a detail you might just miss something at some point in a future report. It may not be a problem but your final solution is a little more unconventional than is really required!!!
From your description, when you set the Phone and Fax template up it seems to be performing as an APPEND template (The data it gathers appears attached to the NEXT record) rather than a FOOTER template (The Data it gathers appears attached to the PREVIOUS detail record.)
It may be as simple as changing the template type to make sure that the phone and fax lines are in a FOOTER template.
The model I built for your sample data works fine that way.
Quite a challenge whichever way one looks at it for a newcomer to Monarch.