For years now we have sent PDF reports either In house or to customers
from RBASE.
We are using RBASE 7.6, use Outlook and use the mapimail4.RBL.
We have either XP or Windows 7 on our 32 bit or 64 bit computers.
When I use the below code, sending a PDF spec sheet, we have few
problems that I know of.
-- Prepare Required Parameters
SET VAR vpipe = '|'
SET VAR vto = 'TO:'
SET VAR vsubject = +
('Subject:Spec Sheet from Kay Park Recreation'&.vModelEnquiry)
SET VAR vcc = ''
SET VAR vbcc = ''
SET VAR vbody TEXT = +
'Body:Here is your Spec Sheet from Kay Park Recreation. Thanks!'
SET VAR vattachments = ('Attachments:'+(.vtotpath))
SET VAR vsenddirect = 'SendDirect:TRUE'
SET VAR vparameters = +
(.vorder+.vdummy&.vpipe+.vto&.vpipe+.vsubject&.vpipe+.vcc&.vpipe+ +
.vbcc&.vpipe+.vbody&.vpipe+.vattachments&.vpipe+.vsenddirect)
CLS
PLUGINS mapimail4.rbl &vparameters
PAUSE FOR 10 USING 'Sending Email. Please wait!'
SET VAR vEmresult = (DLFree('mapimail4.rbl'))
When making Quotes or Orders that require us to send the PDF immediately
after we create the PDF the following code is used.
We have problems with RBASE locking up or Outlook locking up. Then we
either have to exit out of RBASE or Outlook.
SET VAR vfilename = ('PDF\SalesOrder_'+.vcontrol+'.PDF')
CHOOSE vreportname FROM #VALUES FOR sys_report_name FROM sys_reports3 +
WHERE sys_report_name IN (kayparkorder,kayparkorderdisc)
PRINT .vreportname WHERE control# = .vcontrol +
OPTION PDF +
|FILENAME &vFileName +
|TITLE Kay Park Recreation +
|SUBJECT Sales ORDER +
|AUTHORIZATION Sales ORDER Processing Department
SET VAR vpipe = '|'
SELECT distid# INTO vdistid INDICATOR ivdistid FROM orderheader +
WHERE control# = .vcontrol
SELECT emailadd INTO vto INDICATOR ivto FROM orderheader WHERE control#
= .vcontrol
SET VAR vto = ('To:'+.vto)
SET VAR vsubject = ('Subject:Order from Kay Park Recreation'&.vcontrol)
SET VAR vcc = 'Cc:[email protected]'
SET VAR vbcc TEXT = 'Bcc:[email protected]'
SET VAR vbody TEXT = +
'Body:Please review attached sales order from Kay Park Recreation.
Thanks!'
SET VAR vattachments = ('Attachments:'+(CVAL('CURRDIR'))+'\'+.vfilename)
SET VAR vsenddirect = 'SendDirect:TRUE'
SET VAR vparameters = +
(.vorder+.vdummy&.vpipe+.vto&.vpipe+.vsubject&.vpipe+.vcc&.vpipe+.vbcc&.
vpipe+.vbody +
&+.vpipe+.vattachments&.vpipe+.vsenddirect)
CLS
PLUGINS mapimail4.rbl &vparameters
SET VAR vemresult = (dlfree('mapimail4.rbl'))
I have read many threads form the past on emails but still cannot figure
why Outlook or RBASE lock up.
The only difference seems to be we create the PDF just before sending
it.
This has been a thorn in my flesh for some time and I would like to get
it fixed.
Any suggestions sure would be appreciated.
James Belisle
Making Information Systems People Friendly Since 1990