Interactive Reporting - Is there a way to include user defined js file?

Hi,
My struggle with Hyperion IR 11.1 Studio continues... This time I need to know if it is possible to put my own js file somwhere in Studio and make it visible to all my code inside Studio. I have some function ('classes') defined which I use extensively and every time I must copy all my js file to the System or UserSection sections which is really bad practice.
regards,
Paul

I just put this call in the Document.OnStartup() event of most of my files:
eval( (new JOOLEObject("Scripting.FileSystemObject")).OpenTextFile(-2, 1, "\\\\computername\\sharename\\library.js").ReadAll() );This requires you and your users to have read access to the file share, and may assume you are running on Windows.
I've also found I can use Notepad++ as an external script editor for IR Studio. I include a couple of functions in my library to read and write .js files with the same name as the .bqy file and in the same folder.
//     List all scripts in the active document
     ActiveDocument.OutputScripts = function(strOutputFile, blnDisplay) {
          var strOutput = "";
          var strScript = "";
          if (strOutputFile == undefined) {
               strOutputFile = g_strUserTempPath + "\\scriptoutput.txt";
          if (typeof strOutputFile != "string") {
               strOutputFile = g_strUserTempPath + "\\scriptoutput.txt";
          //     default blnDisplay to false
          if (blnDisplay == undefined) {
               blnDisplay = false;
          if (typeof blnDisplay != "boolean") {
               blnDisplay = false;
          //     Cycle through all of the event scripts in the active document.
          for (var i = 1; i <= ActiveDocument.EventScripts.Count; i++) {
               strScriptName = ActiveDocument.EventScripts.Item(i).Name;
               strScript = "/* new script */\r\n";
               strScript += "//script:     " + strScriptName + "\r\n";
               strScript += "//object:     ActiveDocument.EventScripts[\"" + strScriptName + "\"].Script = \r\n";
               strScript += ActiveDocument.EventScripts.Item(i).Script;
               strScript += "\r\n";
               strOutput += strScript;
          //     Cycle through all of the sections in the ActiveDocument.
          for (var i = 1; i <= ActiveDocument.Sections.Count; i++) {
               //     Is it a dashboard?
               if (ActiveDocument.Sections.Item(i).Type == bqDashboard) {
                    //     Cycle through all of the event scripts in the dashboard.
                    strDashboardName = ActiveDocument.Sections.Item(i).Name;
                    for (var j = 1; j <= ActiveDocument.Sections.Item(i).EventScripts.Count; j++) {
                         strScriptName = ActiveDocument.Sections.Item(i).EventScripts.Item(j).Name;
                         strScript = "/* new script */\r\n";
                         strScript += "//dashboard:  " + strDashboardName + "\r\n";
                         strScript += "//script:     " + strScriptName + "\r\n";
                         strScript += "//object:     ActiveDocument.Sections[\"" + strDashboardName + "\"].EventScripts[\"" + strScriptName + "\"].Script = \r\n";
                         strScript += ActiveDocument.Sections.Item(i).EventScripts.Item(j).Script;
                         strScript += "\r\n";
                         strOutput += strScript;
                    //     Cycle through all of the shapes in the dashboard.
                    for (j = 1; j <= ActiveDocument.Sections.Item(i).Shapes.Count; j++) {
                         //     Cycle through all of the event scripts in the shape.
                         strShapeName = ActiveDocument.Sections.Item(i).Shapes.Item(j).Name;
                         for (var k = 1; k <= ActiveDocument.Sections.Item(i).Shapes.Item(j).EventScripts.Count; k++) {
                              strScriptName = ActiveDocument.Sections.Item(i).Shapes.Item(j).EventScripts.Item(k).Name;
                              strScript = "/* new script */\r\n";
                              strScript += "//dashboard:  " + strDashboardName + "\r\n";
                              strScript += "//shape:      " + strShapeName + "\r\n";
                              strScript += "//script:     " + strScriptName + "\r\n";
                              strScript += "//object:     ActiveDocument.Sections[\"" + strDashboardName + "\"].Shapes[\"" + strShapeName + "\"].EventScripts[\"" + strScriptName + "\"].Script = \r\n";
                              strScript += ActiveDocument.Sections.Item(i).Shapes.Item(j).EventScripts.Item(k).Script;
                              strScript += "\r\n";
                              strOutput += strScript;
          try {
               var oTS = ActiveDocument.g_fsoMain.CreateTextFile(false, true, strOutputFile);
               oTS.WriteLine(strOutput);
               oTS.Close();
               if (blnDisplay) Shell(g_strWinPath + "\\notepad.exe", strOutputFile);
          catch (e) {
               Console.Writeln("Scripts could not be output to " + strOutputFile);
          return strOutput;
     //     load scripts from a text file into the ActiveDocument
     ActiveDocument.InputScripts = function (strInputFile) {
          var strInput = "";
          var strScript = "";
          var strDashboardName = "";
          var strShapeName = "";
          var strScriptName = "";
          var objDashboardName;
          var objShapeName;
          var objScriptName;
          var strObjectName = "";
          //     validate input
          if (strInputFile == undefined) {
               return "Input file name is required";
          if (typeof strInputFile != "string") {
               return "Input file name must be a string";
          if (!ActiveDocument.g_fsoMain.FileExists(strInputFile)) {
               return strInputFile + " doesn't exist."
          var oTS = ActiveDocument.g_fsoMain.OpenTextFile(0, false, 1, strInputFile);
          while (!oTS.AtEndOfStream) {
               strInput = oTS.ReadLine();
               if (strInput == "\/* new script *\/") {
                    if (strScriptName != "") {
                         //     load the previous script
                         try {
                              objScript.Script = strScript.substr(0, strScript.length - 2);
                         catch (e) {
                              Console.Writeln(strObjectName + ".Script could not be set.");
                    //     read the new script
                    strDashboardName = "";
                    objDashboard = new Object();
                    strShapeName = "";
                    objShape = new Object();
                    strScriptName = "";
                    objScript = new Object();
                    strObjectName = "ActiveDocument";
                    while (strInput.indexOf("\/\/object") == -1) {
                         strInput = oTS.ReadLine();
                         if (strInput.substr(0, 14) == "//dashboard:  ") {
                              strDashboardName = strInput.substr(14);
                              strObjectName += ".Sections[\"" + strDashboardName + "\"]";
                              try {
                                   objDashboard = ActiveDocument.Sections[strDashboardName];
                              catch (e) {
                                   Console.Writeln(strObjectName + " does not exist.");
                         if (strInput.substr(0, 14) == "//shape:      ") {
                              strShapeName = strInput.substr(14);
                              strObjectName += ".Shapes[\"" + strShapeName + "\"]";
                              try {
                                   objShape = objDashboard.Shapes[strShapeName];
                              catch (e) {
                                   Console.Writeln(strObjectName + " does not exist.");
                         if (strInput.substr(0, 14) == "//script:     ") {
                              strScriptName = strInput.substr(14);
                              strObjectName += ".EventScripts[\"" + strDashboardName + "\"]";
                              if (strDashboardName == "" && strShapeName == "") {
                                   //     it's an ActiveDocument EventScript
                                   try {
                                        objScript = ActiveDocument.EventScripts[strScriptName];
                                   catch (e) {
                                        Console.Writeln(strObjectName + " does not exist.");
                              else {
                                   if (strDashboardName != "" && strShapeName == "") {
                                        //     it's a dashboard eventscript
                                        try {
                                             objScript = objDashboard.EventScripts[strScriptName];
                                        catch (e) {
                                             Console.Writeln(strObjectName + " does not exist.");
                                   else {
                                        //     it's a shape eventscript
                                        try {
                                             objScript = objShape.EventScripts[strScriptName];
                                        catch (e) {
                                             Console.Writeln(strObjectName + " does not exist.");
                    strScript = "";
               else {
                    strScript += strInput + "\r\n";
          //     load the last script
          try {
               objScript.Script = strScript.substr(0, strScript.length - 2);
          catch (e) {
               Console.Writeln(strObjectName + ".Script could not be set.");
          oTS.Close( );
     };I have set up a custom menu in IR Studio using Tools | Customize and included a Script Output var strTemp = ActiveDocument.Path.reverse();;strTemp = strTemp.substr(strTemp.indexOf(".")).reverse() + "js";;;ActiveDocument.wsdot_GlobalStartup.OutputScripts(strTemp, false);; item and a Script Input var strTemp = ActiveDocument.Path.reverse();;;strTemp = strTemp.substr(strTemp.indexOf(".")).reverse() + "js";;;ActiveDocument.wsdot_GlobalStartup.InputScripts(strTemp);; item. That way I have the ability to import/export scripting from any file, provided that my script library has been loaded. (So I have a menu item that loads the script library, too.)

Similar Messages

  • Interactive Report - is there a way to find and change if necessary the unique column.

    While creating an interactive report I accidently entered the wrong "unique column" on the sql query page.  Is this a big deal and how can I find and change if necessary.
    Query Builder
    Link to Single Row View
    Yes
    No
    Uniquely Identify Rows by
    ROWID
    Unique Column
    Unique Column

    33ac2d45-960f-45af-acba-507f01d18e08 wrote:
    Please update your forum profile with a real handle instead of "33ac2d45-960f-45af-acba-507f01d18e08".
    While creating an interactive report I accidently entered the wrong "unique column" on the sql query page.  Is this a big deal and how can I find and change if necessary.
    Query Builder
    Link to Single Row View
    Yes
    No
    Uniquely Identify Rows by
    ROWID
    Unique Column
    Unique Column
    Yes. You can change this using the Uniquely Identify Rows by/Unique Column properties in the Link Column section on the Report Attributes tab of the interactive report definition.

  • By default, Teststand will not include the test step result in subsequence, is there any way to include these step result in report?

    By default, Teststand will not include the test step result in subsequence, is there any way to include these step results in report?
    Thanks
    Jacky

    Hi,
    If your subsequence is in a separate sequencefile, then check the properties of the sequencefile to make sure that the record has not been disabled.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Is there a way to include the sys.aud$ table in a full database dp export?

    I am doing an export using the following parfile information:
    userid=/
    directory=datapump_nightly_export
    dumpfile=test_expdp.dmp
    logfile=test_expdp.log
    full=y
    content=all
    However when I run this I do not see the sys.aud$ in the log file. I know I can do a seperate export to specifically get the sys.aud$ table but is there any way to include it in with my full export?
    Thanks in advance for any suggestion.

    here's more background infomation... I have some audits setup on my database for one of my users. Every quarter I have an automated job that runs that creates a usage/statics report for this person using data in aud$. at the end of the job I export the aud$ table and truncate it. However last quarter I found that there was a mistake in my report and my export did not run properly thus my audit data was gone. i also have full datapump exports that run daily but found that aud$ was not there. so that is why I thought I'd like to include sys.aud$ in the full datapump exports.
    i understand why other sys tables would be left out of a full export but aud$ data cannot be reproduced so to me it makes sense to include it in a full export.
    don't worry, we run our true backups using rman which is eventually how I got the aud$ data back by creating a copy of my database up until the time of the truncate. however this was quite time consuming.

  • Is there a way to include html link with applet?

    I am thinking of writing an applet that would be useful to others, which I would provide for free. In return I would want a link from the pages that use the applet. It is important that the link is search engine friendly, a pure href html link that will provide google page rank to me.
    Is there a way to include such a link with an applet so that it can't be removed?

    No. You can't force other sites to change their content.

  • Is there a way to include a native executable into extension package?

    Hello,
    I need to call some native code from the CS extension using the NativeProcess API.
    Is there any way to distribute a native executable file inside the extension package?
    It looks like there is a way to include an "ordinary" file into a hybrid extension, however the file has to be installed into one of pre-defined locations (such as "$applicationsupport").
    The problem is that in order to create a NativeProcess object in the extension code, I need to know the exact path of the executable, and I can't seem to find a way to find out where exactly the executable was placed by the extension installer.
    Is there a way to install an executable into the extension folder (which I can get using CSXSInterface.getInstance().getSystemPath(APPLICATION))?
    Thank you,
    Anatoly

    Is there a way to install an executable into the extension folder (which I can get using CSXSInterface.getInstance().getSystemPath(APPLICATION))?
    Yep, the answer depends on how you're packaging your extension.
    If you're using Extension Builder, you just need the executable to be automatically copied to the bin-debug folder during the build process. The simplest way to achieve this is to put the executable underneath the src/ folder. Another option is to make your own resources/ directory and add it to the project source path (see the section "Adding resource folders to the project source path" here: http://help.adobe.com/en_US/Flex/4.0/UsingFlashBuilder/WS6f97d7caa66ef6eb1e63e3d11b6c4ce74 9-7fd8.html). Once you've got it copying to the bin-debug folder you're set, you can launch or export as usual and your executable will end up in the extension folder.
    If you're using ucf.jar, just make sure that your executable is in the extension folder you're packaging.
    You shouldn't need to create a hybrid extension in order to have a CS extension that uses NativeProcess.

  • Is there a way to include material in a DVD that some CAN copy?

    Is there a way to include material in a DVD that some CAN copy?
    I have a 30min project that I am going to burn that is copyrighted. But I’d like to add some stills or maybe a screensaver that the purchaser could copy from the disk and use.
    Thanks!

    Copyright is not the same thing as copy protect. Your material may very well be copyrighted, but it won't be copy protected if you are burning the DVD in your Superdrive. You must use a replication house to get copy protection. If you do this, you can include copyable stuff on the disc. I've seen commercial disks with PDF files, etc that you can freely use. I have no experience on how to do it though.
    But, don't fool yourself. There really is no copy protection anymore on DVDs. Anyone with an internet connection can figure out how to defeat it using software available free on the internet. All you can do is make it a hassle to copy it.

  • Is there any way to include excluding one field

    hi all,
    is there any way to include a structure or type in another structure or type by excluding one field?
    regards
    hyma

    I think you are trying to include 2 structures but it is giving error that some fields are common
    you can overcome that like this , these are the 2 additions
    INCLUDE STRUCTURE ZTAB AS name1.
    INCLUDE STRUCTURE ZTAB AS name1 RENAMING WITH SUFFIX name2
    for more info check the help for INCLUDE STRUCTURE

  • Is there a way to include library items in a finder search?

    Is there a way to include library items in a finder search?

    Which Library? Spotlight has a search criteria option that allows you to add system files and folders, including invisible ones. Click on the Desktop, CMD+F. In the window that pops up, click on the Action button, and select Show Search Criteria. For more on those, see http://www.macworld.com/article/2016043/mac-101-smart-searching.html for starters.
    27" i7 iMac (Mid 2011) refurb, OS X Yo (10.10.1), Mavs, ML & SL, G4 450 MP w/10.5 & 9.2.2

  • Importing of Expense Reports - Is there a way to import a specific expense

    Hello All,
    I have a query?
    Importing of Expense Reports - Is there a way to import a specific expense report.???
    Regards
    Aditya

    Can you be specific on "specific" :-)
    You can Export self service expense reports alone or Payables Reports Alone, based on the parameter you specify to the export program.
    Edited by: rveliche on Sep 2, 2008 5:20 AM

  • I am setting up a new Time Capsule to replace another hard drive.  Is there any way to include the the Time Machine history from the old drive on the new Time Capsule?

    I am setting up a new Time Capsule to replace another hard drive.  Is there any way to include the the Time Machine history from the old drive on the new Time Capsule?

    Check item #18 of Time Machine FAQ, particularly the material in #3 of the "How to" section.
    By the way, you've been misled by poor field labeling on this forum into typing a large part of your message into the field intended for the subject.  In the future just type a short summary of your post into that field and type the whole message into the field below that.

  • IS THERE ANY WAY TO EMBED LINKS INTO THE FILE YOU ARE WORKING ON?

    IS THERE ANY WAY TO EMBED LINKS INTO THE FILE YOU ARE WORKING ON?

    Ha! Perfectly classic case of XY problem! Pointed out by Jongware in some other thread recently - couldn't find an exact link right now...
    In short:
        User wants to do X.
        User doesn't know how to do X, but thinks he can fumble his way to a solution if he can just manage to do Y.
        User doesn't know how to do Y either.
        User asks for help with Y.
        Others try to help user with Y, but are confused because Y seems like a strange problem to want to solve.
        After much interaction and wasted time, it finally becomes clear that the user really wants help with X, and that Y wasn't even a suitable solution for X.
    Maybe it worth to add to a list of tips and best practices of the forum:
    Avoid XY problem!

  • *** Is there a way to see all my quicktime file info?

    Is there a way to click on an .mp4 file I have created to see all the attributes including how exactly it was encoded? I encoded a clip for the web late last night that looks great directly from FCP to compressor but when I went to do another one today I couldn't get it to look the same............

    Open the file in QuickTime and select Window>Show Movie Info
    Hopefully this will show you all you need.

  • Is there a way to create user logins or some other way to ...

    Is there a way to create user logins or some other grouping for a set of applications to use (memory) resources optimally -- for example only mail and Safari and Word in one grouping and another for Safari and an audio recording application, etc.?

    It is possible to use Parenal Controls to limit which applications can be used be a particular user account.
    But it's not really necessary as far as managing memory.
    Matt

  • Is there a way to password protect a single file in numbers?

    Is there a way to passwork protect a single file in Numbers?

    Not directly no - there is this work-around which should still work on iOS 6, or you could see if any of the third-party email apps in the app store support a password, or just access your account via Safari (you can create a homescreen shortcut for your account's login page)

Maybe you are looking for

  • IDOC - XI - post HTTP on .ASP?& DATA_CONTENT

    HI ALL ! I have this scenario : 1) R3 send IDOC ORDERS01 to XI (3.0)  2) XI elabs IDOC fields (in mapping step) 3) XI with HTTP Adapter post data to a "page".asp on webserver using querystring (like page.asp?&ID_CUSTOMER=123&ORD_DOC=WE ...etc..) My A

  • IPhone 6 plus screen scratch for no reason

    Seriously, I have took really good care of my iPhone 6 plus and have a cover on it. Without any droping, pumping and hurt, the screen scratched And being worse. The most strangest thing is that evey day the flaw becomes more when I weak up in the mor

  • Settings Application with GUI?

    I'm an avid user of the i3 window manager. However, although I'm comfortable-ish with the command line, I'd much rather use a GUI for most things if I can. One thing I want is a GUI for is system-wide settings, like mouse speed, display settings, key

  • Video Networking -  just a few minor questions!

    Hi there, I have a monster dual core mega PC that i just bought, it's awesome and I love it dearly, but my 2 girl room-mates both have Macs! one - an ibook G4, and the other - a powerbook G4. I have created a folder on my computer called Video and in

  • Finding a mobile support for my imac 27''

    I want to mount my imac on a mobile desktop (like this : http://www.ergotron.com/Products/tabid/65/PRDID/321/language/fr-FR/Default.aspx) - I want it to be easily adjustable in height - I want the inclinaison of the screen to be adjustable - I want i