Workaround for Using an External JS Resource in Parameter Script Methods
To access a js function defined in your report's resources, in your parameter scripts, you can use a workaround like this to read the js file, manually.
From here, you'll be able to call your function, like you would in any other script area, i.e. myFunction();
importPackage(Packages.java.io); importPackage(Packages.java.lang); ist = reportContext.getResource("myJSFile.js").openStream(); myjsstring=""; bytesa = new ByteArrayOutputStream(); var c; while((c=ist.read()) != -1){ bytesa.write(c); } ist.close(); data = bytesa.toByteArray(); value = new String(data); myjsstring = reportContext.evaluate(value);<br />
From here, you'll be able to call your function, like you would in any other script area, i.e. myFunction();
Warning
No formatter is installed for the format ipb
0
Categories
- All Categories
- 108 Developer Announcements
- 53 Articles
- 106 General Questions
- 145 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 899 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 120 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management