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 ?

Thanks

Bill

 

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of A. Razzak
Memon
Sent: Friday, October 29, 2010 5:11 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Printing to PDF File Error Message

At 03:17 PM 10/29/2010, Bill Eyring wrote:

>Using latest release 9.0.4.11027.
>
>When I print a report with the PDF option I get the following ERROR
message.
>
>There was an error opening this document. This file is in use by 
>another application.


Try the following very simple test using Running R:BASE Your Way! Part 16
sample database including with R:BASE eXtreme 9.x and see what you get.

-- Start here ...
-- Print Sample Report as PDF
-- R:BASE eXtreme 9.x (32/64)
-- Database: RRBYW16
-- Report: Invoice

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\'+'Invoice.pdf')
    PRINT Invoice WHERE TransID = 1065 +
    OPTION PDF +
    |FILENAME .vFileName +
    |SHOW_CANCEL_DIALOG OFF +
    |TITLE Customer Invoice +
    |SUBJECT Running R:BASE Your Way! +
    |AUTHOR R:BASE eXtreme 9.1 +
    |KEYWORDS Customer Invoice +
    |OPEN ON
LABEL Done
CLEAR VARIABLES vFileName,vChkFile
RETURN
-- End here ...

Very Best R:egards,

Razzak 


Reply via email to