I seem to have not much luck with getting answers to Document Composer questions...
Here's another one.
I can't get HOLD AS to work. It always just HOLDs that file with HOLD filename regardless of AS...
FILEDEF HOLD_CAR DISK baseapp/MyPDFReport.pdf
-RUN
SET HTMLARCHIVE=ON
COMPOUND LAYOUT HOLD AS HOLD_CAR FORMAT PDF
UNITS=IN, $
SECTION=section1, LAYOUT=ON, METADATA='prop_with_names^Margins_Left=0.5^Margins_Top=0.5^Margins_Right=0.5^Margins_Bottom=0.5^thumbnailscale=4', MERGE=OFF, ORIENTATION=PORTRAIT, PAGESIZE=Letter, SHOW_GLOBALFILTER=OFF, $
PAGELAYOUT=1, NAME='Page layout 1', text='Page layout 1', TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5, METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5,LEFTMARGIN=0,RIGHTMARGIN=0,', $
OBJECT=STRING, NAME='text1', TEXT='<font face="TREBUCHET MS" size=10><FONT size=14 face="TREBUCHET MS ">Heading</FONT></font>', POSITION=(1.146 0.625), MARKUP=ON, WRAP=ON, DIMENSION=(6.458 0.312), METADATA='Z-INDEX: 1; POSITION: absolute; WIDTH: 6.458in; FONT-FAMILY: Trebuchet MS; WORD-WRAP: break-word; HEIGHT: 0.312in; FONT-SIZE: 10pt; TOP: 0.625in; LEFT: 1.146in', $
COMPONENT='report1', TEXT='report1', TOC-LEVEL=2, POSITION=(0.625 1.146), DIMENSION=(2.708 4.167), ARREPORTSIZE=DIMENSION, METADATA='Z-INDEX: 2; POSITION: absolute; WIDTH: 2.708in; HEIGHT: 4.167in; TOP: 1.146in; LEFT: 0.625in', $
END
SET COMPONENT='report1'
-*component_type report
TABLE FILE CAR
SUM
CAR.BODY.RETAIL_COST
BY LOWEST CAR.BODY.SALES
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
ENDSTYLE
END
COMPOUND END
-RUN
EX EDAGET PDF, baseapp/MyPDFReport.pdf
But, if I change the FILEDEF to this:
FILEDEF HOLD DISK baseapp/MyPDFReport.pdf
It works perfectly. How do you do HOLD AS in Document Composer?
Regards, Anatess
I'm on 7.7.03, Windows 7.This message has been edited. Last edited by: Anatess,
May 02, 2014, 08:54 AM
Tom Flynn
Seems to work for me and is saved in BASEAPP... FILEDEF HOLD_CAR DISK baseapp/MyPDFReport.pdf -RUN SET HTMLARCHIVE=ON COMPOUND LAYOUT HOLD AS HOLD_CAR FORMAT PDF UNITS=IN, $ SECTION=section1, LAYOUT=ON, METADATA='prop_with_names^Margins_Left=0.5^Margins_Top=0.5^Margins_Right=0.5^Margins_Bottom=0.5^thumbnailscale=4', MERGE=OFF, ORIENTATION=PORTRAIT, PAGESIZE=Letter, SHOW_GLOBALFILTER=OFF, $ PAGELAYOUT=1, NAME='Page layout 1', text='Page layout 1', TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5, METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5,LEFTMARGIN=0,RIGHTMARGIN=0,', $ OBJECT=STRING, NAME='text1', TEXT='Heading', POSITION=(1.146 0.625), MARKUP=ON, WRAP=ON, DIMENSION=(6.458 0.312), METADATA='Z-INDEX: 1; POSITION: absolute; WIDTH: 6.458in; FONT-FAMILY: Trebuchet MS; WORD-WRAP: break-word; HEIGHT: 0.312in; FONT-SIZE: 10pt; TOP: 0.625in; LEFT: 1.146in', $ COMPONENT='report1', TEXT='report1', TOC-LEVEL=2, POSITION=(0.625 1.146), DIMENSION=(2.708 4.167), ARREPORTSIZE=DIMENSION, METADATA='Z-INDEX: 2; POSITION: absolute; WIDTH: 2.708in; HEIGHT: 4.167in; TOP: 1.146in; LEFT: 0.625in', $ END SET COMPONENT='report1' -*component_type report TABLE FILE CAR SUM CAR.BODY.RETAIL_COST BY LOWEST CAR.BODY.SALES ON TABLE SET PAGE-NUM NOLEAD ON TABLE NOTOTAL ON TABLE HOLD AS 'HOLD_CAR' FORMAT PDF ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * INCLUDE = endeflt, $ ENDSTYLE END COMPOUND END -RUN EX EDAGET PDF, baseapp/MyPDFReport.pdf -EXIT
Not sure if this will help but I looked at the code for a Compound doc that I am writing to PowerPoint. Filename is based on a variable. It uses PCHOLD instead of HOLD:
Your code works! Grr... you have to HOLD AS every single piece of report in the document. That sucks. Those reports are existing reports which are run individually by some other app... I'm gonna have to have all of them changed to accept a HOLD AS parm.
Grr...
BKIN, using your method still wouldn't work unless I have all the individual report components HOLD AS as well.