An Interactive Reporting document is published or imported into the repository, configures the Interactive Reporting database connection mappings, and identifies how the EPM Workspace server treats sections. This function performs the work also done by the publishing wizard when an Interactive Reporting document is imported into EPM Workspace.
Example using publishBqyFile:
var uuid = objRep.publishBqyFile(objF, strN, strD, uuiF, blnD, strH, oceP)
Parameter | Description |
---|---|
objF | The Interactive Reporting document that is being published |
strN | The file name being published |
strD | The description associated with the file being published |
uuiF | The folder UUID under which this is to be published |
blnD | True indicates that the Interactive Reporting document contains dashboard sections |
stwH | The section name that is displayed when the Interactive Reporting document is activated on the thin client and when |
oceP | An object that represents section information for the Interactive Reporting document, including the Interactive Reporting database connection information is associated with each query and data model |
The example illustrates publishing a copy of an Interactive Reporting document. For example, if the selected file is called sales analysis, it is published with a name provided by the user, or if no name is provided as Copy of sales analysis, into the same folder as the source document. The Interactive Reporting database connection mappings from the source file are also copied to the new file so it can be processed in the same way as the source file. The script works on the desktop and in EPM Workspace.
Example: Publishing a copy of an Interactive Reporting document.
/** * * @param document Select the source to copy. * @inputType file_picker_single_value * * @param target Provide a name to call the copied file * */ var uuiSrc = env.getParameterValue("document"); var repLocal = env.getRepository(); var filSrc = repLocal.retrieveFile(uuiSrc); var vrsSrc = repLocal.retrieveVersionedDocument(uuiSrc); var strSrc = vrsSrc.getName(); var strTrg = env.getParameterValue("target"); if (strTrg == null){ strTrg = "Copy of " + strSrc; } var uuiFolder = vrsSrc.getParentIdentity(); var domSrc = env.getDocument(filSrc, bqReadWriteDom, null); var oceMapOld = vrsSrc.getSectionOCEMapping(); var oceMapNew = domSrc.sectionOCEPairInfos(uuiFolder); for (var a = 0; a < oceMapOld.length; a++) { if (oceMapOld[a].isOCEEnabled()) { oceMapNew[a].setOCEDocument(oceMapOld[a].getOCEDocument()); oceMapNew[a].setOCEEnabled(true); } } var strDesc = "this file was copied by a Rhino script from " + strSrc var blnD =domSrc.isDashboard() var strH = domSrc.getInitialTCSection() repLocal.publish(filSrc, strTrg, strDesc, uuiFolder, blnD , strH, oceMapNew);