Does the command really end with /window or are you saying it does not work for creating anything, table, summary or anything at all?
Does everything work if you manually export from within Monarch?
Have you considered setting up your export(s) as project exports which would make the script somewhat shorter and should allow it to work just as the project export does? (assuming it does work ....)
[size="1"][ June 25, 2007, 06:48 PM: Message edited by: Grant Perkins ][/size]
In the Help Files, go to Chapter 9-Monarch Command Lines, Overview.
/window probably should have been written as
If you read the description, it instructs you to use
as a switch depending on which window you want to export (Report, Table, or Summary).
/window is not a valid switch.
Datawatch Tech Support
I talked to somebody in support and they don't think I can run a batch file and convert the text file to a pdf with out setting up a table. I find it interesting that if I load the text file and then create a template with nothing but the page header checked, it breaks the report up into pages. If I then leave it on report and then export it, you can export it to a PDF (default) with what ever file name you would like. I have about 250 text files that I wanted to convert every week to a pdf file and I was hoping this might do it using a batch file.
I'm opened to any ideals that some of you might have. I was also wondering about some undocumented switches that might work. Also I want to thank the suppot department for calling me back so quick.
It's not something I have needed to do so my exposure to this is limited but I would have thought that using the /R qualifier to specify the Report screen should have worked for you. Either that or set it up as an Export Project.
As for a table, yep, I would guess that a table is a fundamental part of ensuring success but it only needs a simple model to capture every line as a field or, as you have already done it seems, identify the page break point you want to set.
There are benefits to doing more of course, as the Help file points out such as configuring the tree view for the report after modelling, which will then provide bookmarks in the pdf file.
I don't see the problem. This works very nicely for me using Monarch V9 Pro:
[font="courier"] "C:Program FilesMonarchMonarch.exe" "C:Program FilesMonarchReportsclassjan.prn" "C:Program FilesMonarchModelsExpPDF.xmod" "C:Program FilesMonarchExportExpPDF.pdf" /R /font[/quote]In my Model I created an empty Detail and a Page Header Template.
Datawatch Tech Support
Well Dee, I tried and it runs but won't create the PDF files. Below is a copy of my Bat file.
"monarch.exe" "D:mo bid actPRINTR15246375 (13).txt" "D:mo bid actmorning models idactpdf.xmod"
"D:mo bid actconverted bid act47503.xls" /R
"monarch.exe" "D:mo bid actPRINTR15246375 (2).txt" "D:mo bid actmorning models idactpdf.xmod"
"D:mo bid actconverted bid act46971.xls" /R
I added the wait so it wouldn't run so fast. I created a blank detail and a page header just like you suggested and it looks like it runs but nothing is in the folder.
Also I want to create separate PDF files out of each text file.
When its finished, I will have 250 separate PDF files that I can link to from a webpage.
I really appreciate the help you guys are giving me.
Dee, Do you think it wouldn't work because of me using a TXT file instead of a PRN?
I found a mistake and corrected the bat file. It now makes PDF's. I went back to look and I had the output file extension set as a xls. Thats what happens when you start copying stuff from one file to the other trying to save some time.
I will try running the 250 files and let everybody know what happens. Again, you guys are the greatest.
Let's clarify this:
From Monarch V9 you have the ability to export the Report (input file) from the Report Window, the Table(s) from the Table Window, or the Summary(s) from the Summary Window.
If exporting the Report as a PDF from the Report Window, there should be no associated row numbers involved unless they are actually in the Input File. Page Setup options are limited. The Report File should export as a PDF and look exactly the same in Adobe as it does in Monarch Report Window.
The switch, /R, is used here.
If exporting from the tabular data from the Table Window as a PDF, the Page Setup Options may be used to alter the display of the tabular data (grid lines, row numbers, etc.).
The switch, /T, is used here.
Same applies for the Summary Window as the Table Window...
The switch, /S, is used here.
In addition, if exporting multiple Tables/Summaries/Filters/Sorts, Project Exports should be created, saved in the Model and saved as a Project.
The Command Line will then run the Project, change the input file if necessary, and Export according to the Project Export instructions.
The switch, /px:[project export name]
/pxall, is used here.
The important steps are to make sure the paths are correct, the syntax is correct and the formats are correct.
I hope this is a little more helpful.
Datawatch Tech Support
Sorry, I meant to address the issue of creating seperate PDF files from the Page Breaks:
You will not be able to Export from the Report Window in Monarch to individual PDF files based on the Page Breaks created in Monarch.
You may, however, create Filters for each Page and set up a Project Export to export All Filters as Files in Folder.... with the PDF extension. This would need to be saved and run via the Command Line as a Project.
[size="1"][ June 28, 2007, 02:54 PM: Message edited by: Dee Moore ][/size]