Upload
vasubandi8
View
216
Download
0
Embed Size (px)
Citation preview
8/14/2019 Run Crystal
1/3
Running Crystal Reports under NT process scheduler and having the
output email back to the user
As delivered in our version of PeopleSoft, if you setup a NT Process scheduler and run crystal reports on it,
we found that the output is placed in the %TEMP% (usually c:\tep! and is an AS"## file$ This has pro&les with it$ The first is that the output is AS"## and doesn't loo at all lie the desired output$ The
second is that all the reports are placed in the sae directory$ #f you )ive networ access to the directory,everyone can )et any report they want$
*hat we have done is to write a +"' pro)ra that will &e used as a wrapper$ This wrapper pro)ra will
run the PeopleSoft delivered process to run "rystal reports, then it will loo up if the person has a -SN
eail address (this can &e chan)ed via the select stateent in the pro)ra!$ #f the user has none, it uses a
default address &ased on the operator's PeopleSoft id$ .ur data&ase is currently .racle, so the pro)ra is
written for .racle usin) the ."# li&raries that .racle provides$ The wrapper pro)ra then collects the
"rystal output, and eails the output &ac to the user usin) a pro)ra called /AT$
Setting up an NT process scheduler
#t a nut shell, to setup an NT process scheduler, you need first have .racle confi)ured correctly$ Then pic
where you want have the files placed (ie 0:\Application1ersion\0ata&aseNae!$ *e setup totallydifferent areas for different data&ases$ This way the "rystal reports that are run can &e tested in one
data&ase and when ready &e oved to the tar)et data&ase$
So to start with, # ae a d:\2E34 directory, followed &y d:\2E34\0ata&ase$ .nce done then in that
directory # ae a TEMP directory$ This is where # will confi)ure the process scheduler to place the files
instead of usin) %TEMP%$
.ay once done, we run psappsrvxfr.batd:\he!\"atabase(d:\he34\heuf! on the file server %SE51%\Appserv$ (s:\he34\appserv!$ This transfer "../ pro)ras, plus all the &inaries needed to run thin)s$
Ne6t we need to )et a copy of the client tools$ 7ou can runnin) the off of the networ drive, &ut then youneed to &e lo))ed into the achine to run the process scheduler$ This ay &e oay for you, &ut here we are
)oin) to copy the files over$ Note on a tools up)rade, you will need to rerun the psappsrvxfrand do this
copy$ .ay, what # do is to install Peoplesoft on the client, &ut in the confi)uration ana)er on the Client
Setupta&, # clic the #nstall $orkstationchec &o6$ #n the %ocal "irectoryentry field, # typed
0:\2E34\"/#ENT
Ne6t you need to copy over the crystal reports you want to &e a&le to run$ 8or us it is all of the, so wecopy S:\&'!\CR$ to ":\&'!\&'(C)\CR$$ The psappsrv6fr process doesn't copy this inforation
Now we run psadmin fro the appserv directory that is on the local hard drive$ 7ou will &e creatin) a
process scheduler$ Soe values that you i)ht want to set are:
- 0#N: should &e where your oracle &inaries are (c:\orant\&in!$
-
TEMP: chan)e it to &e the tep directory you ade a&ove- T../#N: "han)e it to win694 directory you ade a&ove plus addin) the &in\client\win694
(ie$ 0:\2E34\"/#ENT\in\"lient\*#N94!
.nce done you will need to the environent varia&le PS;2.ME to 0:\2E34\0ata&ase
(0:\2E34\2E-"8!$ #f you plan on runnin) ore than < process scheduler, do not set this via the syste
icon in the control panel$ *hat # do is to have a .*+Tfile which sets the varia&le then ics off psadmin$
.nce you have done this you should have a NT process scheduler that runs crystal pro)ras$ #f you run a
crystal report, The AS"## output should &e placed in the tep directory that you typed in a&ove$
8/14/2019 Run Crystal
2/3
%ocal Confiruation Changes
The first thin) is to copy the *lat.exepro)ra to C:\$#NNT\, if you don't want to place it there you will
need chan)e the pro)ra RunCrystal.exe$
Ne6t thin) is you need to )et a copy of the 5un"rystal$e6e pro)ra$ #t contains < file (main.c!, which is a+"' pro)ra that does the followin):
- Parses out the coand line ar)uents sent to it fro PeopleSoft$
- 5un the ori)inal pro)ra PeopleSoft intended to run$
- .nce the ori)inal pro)ra has finished, it loos up or sets the eail address of the person
runnin) the "rystal 5eport, via the .racle ."# li&rary$
- Then usin) *lat.extthe pro)ra eails the "rystal .utput to the user$
#nstall the RunCrystal.exepro)ra into the *#N94 directory$
The ne6t thin) you need to do is to fi6 how "rystal 5eports are run$ =o into Peoplesoft, and followin) this
Navi)ation, ,o - /eopleTools - /rocess Scheduler - (se - /rocess Types - (pdate0"isplay$Select the Type 0efinition for the 8ollowin) values: /rocess Type 1 Crystal23perating System 1 NT
Sever2 "atabase Type 1 3racle. 7ou should see a window lie this:
The first thin) you will do is to chan)e the Command %ine:paraeter fro:
44T33%*#N44\/SCRR(N.'5'to 44T33%*#N44\RunCrystal.exe
The ne6t thin) you will do is add ore ites to the /arameter %ist:, the thin)s you will &e addin) are:
- At the &e)innin) add: 44T33%*#N44\/SCRR(N.'5', which coes fro a&ove$
8/14/2019 Run Crystal
3/3
- Ne6t you will add -(C)644+CC'SS#"44 -(C)744+CC'SS/S$"4ri)ht &efore
the last ite on the list$ This will tell the process scheduler to send &oth the sysad lo)in
(typically sysad! and the password$ This way the RunCrystal.exepro)ra can )o &ac
into the data&ase and loo for an usiness Eail address$
- Ne6t chan)e 3/443(T/(T"'ST44to 3/443(T/(T"'ST444
4#NST+NC'44."3C, this will force the output filenae of the crystal report to &e the
instance numberfollowed &y .doc$ Since the output filenae ends in .doc, "rystal reportswill create a $ord "ocument$
# thin that is all you need to now to do it$
2ave 8un>