[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] PDF Files created by SQR
- Subject: RE: [sqr-users] PDF Files created by SQR
- From: "Meenu Jhigan" <MJhigan@scu.edu>
- Date: Wed, 04 Aug 2004 20:13:12 -0700
- Cc:
- Delivery-date: Wed, 04 Aug 2004 22:14:49 -0500
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
I use a table to store email addresses amongst other fields on the table
and use an application engine program that has peoplecode to generate
emails for everyone in the table. This table is part of certain process
and is deleted and filled with new rows everytime we run the process.
Peoplecode uses sendmail function that allows you to enter from , to ,
subject, text ,attachment - everything that an email has.
This procedure also requires SMTP settings on the Unix and NT servers.
This is a bit different approach from using sqr but is a good one to
use if your aim is to just send emails with some details. We are using
this for almost 3 years now and it runs a few times in a week and works
great.
Hope this helps.
Meenu
>>> Thomas-Hins@ouhsc.edu 8/4/2004 1:58:53 PM >>>
I just wrote an SQR and from Unix I email files to different users.
The trouble is I hardcoded the email addresses, I didn't like that but I
would have liked to make a small table and load the filename, email
address to receive it and retrieve it from there each time but didn't
take the time to do that. That way I could just update the table and
not change the sqr, add recepients if I want etc.
Here is the email code I used. I'll probably change it in the future
to use a table to get who receives the different files. You are also
suppose to be able to have a subj line, etc and I found I could have a
subject line and no attachment or an attachment and no subject line,
played around for awhile and couldn't get both to work if someone else
has experience and wants to share that would be appreciated. Positive
changes are also invited, code below is subject to your own testing for
your environment...
Begin-REPORT
do Init-DateTime
do Get-Current-DateTime
do STDAPI-Init
Let $ReportID = 'OUFNDCK'
do Open-File-Logic
do Init-REPORT
do Get-Rpt-Dates
do Process-Main
do stdapi-term
Display $Asoftoday
Close 10
Close 20
Close 30
Do Email-File
do Reset
end-REPORT
begin-procedure Init-Report
! Let $filedate =
SUBSTR($Asoftoday,1,2)||substr($Asoftoday,4,3)||substr($Asoftoday,8,4)
Let $File1 = $ftpout||'badsprd.dat'
let $File2 = $ftpout||'Badempearns.dat'
let $File3 = $ftpout||'Badgrants.dat'
#debug display $file1
SHOW 'OUTFILE IS ' $FILE1
Open $File1 as 10 for-writing record = 120:vary
Open $File2 as 20 for-writing record = 187:vary
Open $File3 as 30 for-writing record = 187:vary
if $prcs_process_instance = ''
! No Prompt
end-if
end-procedure
Begin-Procedure Email-File
IF #Inactivated > 0
let $system = 'uuencode '|| $FILE1 ||' '|| $FILE1 ||'| mail
xxx1@xxxx.edu'
show 'system variable is ' $system
CALL SYSTEM USING $system #unix_status
let $system = 'uuencode '|| $FILE1 ||' '|| $FILE1 ||'| mail
xxx2@xxxx.edu'
show 'system variable is ' $system
CALL SYSTEM USING $system #unix_status
End-if
IF #BAD_EMP_EARNS > 0
let $system = 'uuencode '|| $FILE2 ||' '|| $FILE2 || '| mail
xxx1@xxxx.edu'
show 'system variable is ' $system
CALL SYSTEM USING $system #unix_status
let $system = 'uuencode '|| $FILE2 ||' '|| $FILE2 || '| mail
xxx2@xxxx.edu'
show 'system variable is ' $system
CALL SYSTEM USING $system #unix_status
let $system = 'uuencode '|| $FILE2 ||' '|| $FILE2 || '| mail
xxx3@xxxx.edu'
show 'system variable is ' $system
CALL SYSTEM USING $system #unix_status
let $system = 'uuencode '|| $FILE2 ||' '|| $FILE2 || '| mail
xxx4@xxxx.edu'
show 'system variable is ' $system
CALL SYSTEM USING $system #unix_status
End-if
IF #Bad_Emp_Grants > 0
let $system = 'uuencode '|| $FILE3 ||' '|| $FILE3 || '| mail
xxx1@xxxx.edu'
show 'system variable is ' $system
CALL SYSTEM USING $system #unix_status
let $system = 'uuencode '|| $FILE3 ||' '|| $FILE3 || '| mail
xxx2@xxxx.edu'
show 'system variable is ' $system
CALL SYSTEM USING $system #unix_status
let $system = 'uuencode '|| $FILE3 ||' '|| $FILE3 || '| mail
xxx3@xxxx@ouhsc.edu'
show 'system variable is ' $system
CALL SYSTEM USING $system #unix_status
let $system = 'uuencode '|| $FILE3 ||' '|| $FILE3 || '| mail
xxx4@xxxx.edu'
show 'system variable is ' $system
CALL SYSTEM USING $system #unix_status
End-if
Tom Hins
Information Technology - Application Solutions
University of Oklahoma Health Sciences Center
P.O. Box 26901
Oklahoma City, OK 73190
Phone:(405) 271-2262 Ext. 50213
Fax: (405) 271-2352
(The information transmitted is intended only for the person or entity
to which it is addressed and may contain confidential and/or privileged
material. If you are not the intended recipient of this message you are
hereby notified that any use, review, retransmission, dissemination,
distribution, reproduction or any action taken in reliance upon this
message is prohibited. If you received this in error, please contact the
sender and delete the material from any computer. Any views expressed in
this message are those of the individual sender and may not necessarily
reflect the views of the company.)
-----Original Message-----
This message scanned for viruses and SPAM by GWGuardian at SCU (MGW1)
Here was an embedded message of 'message/rfc822' MIME type. It has been
automatically discarded before sending the whole message to the list,
since it didn't contain any(more) textual part.
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users