At 06:20 PM 10/29/2010, Bill Eyring wrote:
Razzak,
Thanks for the sample which, of course, worked. I then moved your code into
my code exactly except for the particulars of the report name and the where
clause and it did NOT work. However I did note that the difference between
your example and my report was your report was portrait whereas my report
was landscape. I changed my report to a portrait type report and it worked !
The question then is what can I do to print a PDF report in landscape? Is
it the Margin_top,_right,_bottom settings?
Bill,
Technically, if the report is designed and set up correctly as "Landscape",
it should print as "Landscape" regardless of the PRINT ... OPTION.
To verify:
Report Designer | File | Page Setup | Paper Size | Orientation | Landscape
Now try the following simple test using the sample code below and see what
you get.
-- Start here ...
-- PRINT_PDF_Landscape.RMD
-- Print Sample Report as PDF (Landscape)
-- Database: RRBYW16
-- Report: SubTotalsAndTotals
-- Orientation: Landscape
-- R:BASE eXtreme 9.x (32/64)
IF (CVAL('DATABASE')) <> 'RRBYW16' OR (CVAL('DATABASE')) IS NULL THEN
CONNECT RRBYW16 IDENTIFIED BY NONE
ENDIF
SET VAR vFileName TEXT = NULL
-- Verify the existence of PDF Sub-Directory
SET VAR vChkFile INTEGER = NULL
SET VAR vChkFile = (CHKFILE('PDF'))
IF vChkFile <> 1 THEN
MD PDF
ENDIF
CLS
SET VAR vFileName = ('PDF\'+'SubTotalsAndTotals.pdf')
PRINT SubTotalsAndTotals +
OPTION PDF +
|FILENAME .vFileName +
|SHOW_CANCEL_DIALOG OFF +
|TITLE Calculating Sub-Totals And Totals +
|SUBJECT Running R:BASE Your Way! +
|AUTHOR R:BASE eXtreme 9.1 +
|KEYWORDS Sub-Totals and Totals +
|OPEN ON
LABEL Done
CLEAR VARIABLES vFileName,vChkFile
RETURN
-- End here ...
Hope that provides you with some blue's clues ...
Very Best R:egards,
Razzak.