Dynamically Loading Java Sripts

Options
jsakhamuri
edited February 11, 2022 in Analytics #1
RMurphy had posted an excellent article on DevShare outlining how to dynamically load java scripts in BIRT. This is great report and runs great in the Eclipse-BIRT developemnt environment. My test environment is Tomcat7.0 with BIRT Viewer. When I excute the report, the button shows up, but when I press the button myFunction does not get executed and I do not get an alert. I looked at the webconsole and found out that myFunction is not accessible. I have changed the report variable
Script_mySampleScript to "http://localhost:9090/birt-viewer/report/SimpleExample.js" to match my setup.
I have include the report with the changes that I made, and also a screen shot showing the directory structure and location of the files.

Comments

  • rmurphy
    edited December 31, 1969 #2
    Options
    This is working fine for me. Are you sure you published the rptlibrary to the working folder? I just tested in the latest 3.7 and 4.2 releases. By default the working folder is the root of the context. You can change this in the web.xml


    BTW, thanks to the great feedback received on this library, BIRT 4.3 project plan contains a project to "Support Easy Inclusion of Client Side JavaScript Libraries". BIRT 4.3 is part of the Eclipse 4.3 (code named Kepler) release which is scheduled for release on June 26, 2013.

    http://www.eclipse.org/projects/project-plan.php?planurl=http://www.eclipse.org/birt/project/plan/birt_project_plan_4_3.xml#themes_and_priorities
  • <p>What do you mean by the report library?  Can you please help  me understand?  I deployed the report file to the C:ApacheSoftwareFoundationTomcat7.0webappsbirt-viewerreport directory. </p>