Please remove me from this mailing list. I'm no longer using R:Base as I was the only one around here that knew how to drive it and I've moved to SQL Server as the corporate standard. Bill Stomfay Manager, Budget Systems Support Budget Services Unit, Finance Branch Phone: (07) 323 41366 Fax: (07) 323 40987 QH Intranet: http://casemix.health.qld.gov.au ( http://casemix.health.qld.gov.au/ )
>>> "Bill Eyring" <[email protected]> 17/02/2009 6:49 am >>> Razzak, Thanks for your example. I have quit mucking about with with the date format and have changed my code to the proscribed format. Your sample code also worked. However, when I put your code(slightly modified to print my report - see below) into my form which executes when the PDF Radio button is clicked, I get the same result as before. Multiple copies of the PDF report keep printing until I stop it. I use this form to print 17 reports in my application. Rather than have 17 different forms to print a report, I use variables in the Main Menu which get passed to the form in question. Needless to say I am perplexed by this issue. Any help you can provide would be greatly appreciated. Should I send a sample to RDCC ? Many thanks, Bill Eyring Razzak's Code Modified -- Define the FileName CLEAR VAR vFile SET VAR vFile TEXT = + ('CliList_'+(FORMAT(.#DATE,'MMDDYYYY'))+'.PDF') -- 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 -- Example: -- Concatenating the report name and date to create a PDF file name -- start here --LABEL Start {IF (CVAL('DATABASE')) <> 'RRBYW14' OR (CVAL('DATABASE')) IS NULL THEN CONNECT RRBYW14 IDENTIFIED BY NONE ENDIF} -- Define the FileName CLEAR VAR vFileName SET VAR vFileName TEXT = + {('SalesSumAndSubTotals_'+(FORMAT(.#DATE,'MMDDYYYY'))+'.PDF')} ('CliList_'+(FORMAT(.#DATE,'MMDDYYYY'))+'.PDF') -- 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 {PRINT SalesSumAndSubTot +} PRINT CliList + OPTION PDF + |FILENAME PDF\.vFileName + |SHOW_CANCEL_DIALOG ON + |BACKGROUND_FILE NONE + |BACKGROUND_TYPE CENTER + |BACKGROUND_COLOR WHITE + |INCLUDE_LINES ON + |INCLUDE_SHAPES ON + |INCLUDE_RICHTEXT ON + |RICHTEXT_ENCODING_TYPE PLAINTEXT + |INCLUDE_IMAGES ON + |IMAGE_FORMAT JPG + |PIXELFORMAT 32 + |JPEG_QUALITY 100 + |IMAGE_DPI -1 + |INCLUDE_HYPERLINKS ON + |GENERATE_TOC ON + |TITLE Customer Sales Sub-Totals and Totals + |SUBJECT Sales Summary Report + |AUTHOR Accounting Team of Consolidated Computer Company + |KEYWORDS SubTotals Totals Sales Summary + |USE_COMPRESSION ON + |COMPRESSION_METHOD MAXCOMPRESS + |FONT_ENCODING WIN_ANSI + |EMBED_USED_FONTS ON + |OPEN ON {LABEL Done CLEAR VARIABLES RBTI_%,vFileName,vChkFile RETURN} -- end here goto EYRING label EYRING set v vout=null set v vcno=null set v vclinames=null set v vfile=null PROPERTY VRG_Print RADIOBUTTONS[0]->CHECKED FALSE PROPERTY VRG_Print RADIOBUTTONS[1]->CHECKED FALSE PROPERTY VRG_Print RADIOBUTTONS[2]->CHECKED FALSE PROPERTY VRG_Print RADIOBUTTONS[3]->CHECKED FALSE PROPERTY VRG_Print RADIOBUTTONS[4]->CHECKED FALSE PROPERTY VRG_Print RADIOBUTTONS[5]->CHECKED FALSE recalc variables return -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of A. Razzak Memon Sent: Monday, February 16, 2009 11:52 AM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: Problem printing to PDF file At 10:38 AM 2/16/2009, Bill Eyring wrote: >I've spent my Presidents Day weekend perplexed and dismayed by a >problem I have printing a simple report to a pdf file. Without knowing all details, try the following very simple example that concatenates the DATE without mucking with the date format to create a PDF file name. Steps: 01. Create a file with the following code (copy and paste) 02. Place the file in RRBYW14 folder 03. Run the file and see what you get Have fun! Very Best R:egards, Razzak. -- Example: -- Concatenating the report name and date to create a PDF file name -- start here LABEL Start IF (CVAL('DATABASE')) <> 'RRBYW14' OR (CVAL('DATABASE')) IS NULL THEN CONNECT RRBYW14 IDENTIFIED BY NONE ENDIF -- Define the FileName CLEAR VAR vFileName SET VAR vFileName TEXT = + ('SalesSumAndSubTotals_'+(FORMAT(.#DATE,'MMDDYYYY'))+'.PDF') -- 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 PRINT SalesSumAndSubTot + OPTION PDF + |FILENAME PDF\.vFileName + |SHOW_CANCEL_DIALOG ON + |BACKGROUND_FILE NONE + |BACKGROUND_TYPE CENTER + |BACKGROUND_COLOR WHITE + |INCLUDE_LINES ON + |INCLUDE_SHAPES ON + |INCLUDE_RICHTEXT ON + |RICHTEXT_ENCODING_TYPE PLAINTEXT + |INCLUDE_IMAGES ON + |IMAGE_FORMAT JPG + |PIXELFORMAT 32 + |JPEG_QUALITY 100 + |IMAGE_DPI -1 + |INCLUDE_HYPERLINKS ON + |GENERATE_TOC ON + |TITLE Customer Sales Sub-Totals and Totals + |SUBJECT Sales Summary Report + |AUTHOR Accounting Team of Consolidated Computer Company + |KEYWORDS SubTotals Totals Sales Summary + |USE_COMPRESSION ON + |COMPRESSION_METHOD MAXCOMPRESS + |FONT_ENCODING WIN_ANSI + |EMBED_USED_FONTS ON + |OPEN ON LABEL Done CLEAR VARIABLES RBTI_%,vFileName,vChkFile RETURN -- end here ******************************************************************************** This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error. Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters. If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender by telephone collect on Australia +61 1800 198 175 or by return email. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced. If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited. Although Queensland Health takes all reasonable steps to ensure this email does not contain malicious software, Queensland Health does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email. Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government. **********************************************************************************

