Hi barillas and welcome to the Monarch forum.
Under the File menu, you'll find the Page Setup dialog that allows you to define the header that will be included in Excel and PDF exports, but I don't think that this is really what you want.
By the sounds of it you'd like to extract the first few lines from page 1 of your report, for instance, and have that as the heading for your Excel or PDF. Correct?
I don't think that we can easily do that for Excel output, but by jumping through a few hoops, we should be able to create a PDF in this format.
Am I on the right track?
You are certainly are. Thank you.
Yes, I'm using a customized header now, in lack of the original header.
The header is some lines in every page, and really, the information I'm looking for is the business date of the report, this is very important for the user's reference.
I had a long time not attending forums, and I'm amazed on Monarch's, I've browsed some of the issues and the responses are great.
You know, I had a nice response typed up for this and I lost it all as my login timed out and, the one time that I forget to copy it all before I "submit", I messed up my password logging back in. So here I go again...
This can be done for a PDF export, but I don't see an Excel solution at the moment that's as straightforward (such as it is), and it takes jumping through a few hoop, as it were.
Start by creating a model that will extract your header as a detail template, setting whatever trap you need to do that. Paint the entire width as a single Memo field, and on the Advance tab, set it to End Field on the number of lines in the header sample. Name this field "A". You could handle it differently, but let's go with this approach.
In the Table window, filter to only show the first record with the formula being:
Now build a calculated Memo field to format the extraction a little better (odds are that what you have isn't "pretty") using:
adding chr(13) and Textline functions for each line your header.
Now hide field A and under the Options menu, export and clipboard, turn off the option that exports field names.
Create (and run) a project export that sends the Table to a fixed-length text file. Save and close the model and the project.
In a second model, which extracts the actual data from the report, build a project export that will append the Table data to the newly exported text file. Again, save and close this model and project.
Finally, open the newly created text file in a new Monarch session define the page size and layout for the PDF file (under the file menu) and then from the Report window, build a project export to create a PDF file.
This should give you a PDF with a "live" header from your source report, followed by extracted data.
Hmm... it was point out to me that v8 probably doesn't offer the ability to export to PDF from the report window. That feature was likely introduced in v9. Funny how quickly we adapt to new software, regardless of how long we used the old stuff.
No matter, worst case scenario is that you install something like the free utility named [URL="http://www.cutepdf.com/products/cutepdf/Writer.asp"]CutePDF[/URL] and convert the final text file to PDF outside of Monarch.
You can do this very easily in Monarch 10.
There is an option to add "first value of field" to the page header, designed for this very purpose.
It's only for constant values, such as report date. You just go into the page setup, choose the first value of field option and choose the field you want to take the data from.
Obviously this then updates dynamically with new data every time.
Currently, I'm using Monarch the following way:
An ASCII file is produced for a report from the IBM OnDemand client (we are using it in an AS/400 for spool files). The file is sent to a folder. I've created a Project that generates an XLS and PDF from the file in that folder (I use a .BAT to run the process).
I'm using only one Template, with only detail columns and some filters applied to the result.
Is there any way to add the header of the original report to the XLS and/or PDF output file?.
I've tried to add a Page Header Template, but what it does is to add the header as a column.