Oracle BI EE 11g – Calling JS Scripts
How to save the reports scheduled via Agents to a local directory using a simple JS Script:
JS Script Method:
var FSO = new ActiveXObject("Scripting.FileSystemObject");
var foldername = 'D:\IBOT'
if (FSO.FolderExists(foldername))
{
var fileName = foldername + "\\" +Parameter(1);
var fooFile = FSO.CopyFile(Parameter(0), fileName, true);
}
else
{
FSO.CreateFolder(foldername);
var fileName = foldername + "D:\IBOT" + Parameter(1);
var fooFile = FSO.CopyFile(Parameter(0), fileName, true);
}
Or
We can convert vb script to Js script. Your wish !!!!
Please copy the above script in notepad then save
as satyaexport_report.js then move to this file as mention below path.
C:\OBIEE11G\instances\instance1\bifoundation\OracleBISchedulerComponent\coreapplication_obisch1\scripts\common
Follow the steps.
Good Luck!!!!!!
Thanks,
Satya Ranki Reddy
hi Can u tell me what do you mean by parameter(0) and (1) in js script
ReplyDeletethanks
Goutham
Hi Goutham Reddy,
ReplyDeleteThanks for visiting my blog.
0--->Delevery content as PDF
1-->satya.PDF
Parameter (1) you can see above what this Java Script basically does is that it accepts one parameter (Parameter(1)) which is the file name and saves this file to a desired location ex: For me D drive it will store.
Parameter(0) : Noting but define the output format specification.
Hope this help’s
Thanks,
Satya
Thnks Issue solved
ReplyDeleteHi Satya,
ReplyDeleteCan we achieve this in Linux? My BI Server is installed on Linux Box.
Thanks,
Hi
DeleteIt is not possible in linux / unix. But using action link it is possible but we can't trigger action link method.
Thanks,
Satya
Hi Satya,
DeleteI have followed same process to sent i bot FTP server location. But i got below error.
[nQSError: 61007] File error: path=E:\Oracle\instances\instance1\bifoundation\OracleBISchedulerComponent\coreapplication_obisch1\scripts\common, code=5: Access is denied.
It seems folder permission issue.
DeleteHi Satya,
DeleteThen how to resolve this issue. I have try to make path as shared path and also same issue.
Please let me know how reslove this issue.
Thanks,
Malli
Hi Stahya , I wanna to implement same on Linux machine . Can you help me on same
ReplyDeleteHi Stahya , I wanna to implement same on Linux machine . Can you help me on same
ReplyDeleteHi satya ,please clear this
ReplyDelete[nQSError: 66013] [Line:51 Column:1]
[nQSError: 66016] Unknown error code '0x80070002'.