Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Eclipse BIRT Sample Viewer and external .js file
sokann
I am trying to move some common beforeOpen script to an external .js file, as described in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=218181
This works fine in the Report Designer, but doesn't seem to work in Eclipse BIRT Sample Viewer. Is this a missing feature in the Sample Viewer?
Find more posts tagged with
Comments
JasonW
Do you have the js file in the deployed resource folder? Can you post the report and js file?
Jason
sokann
Just found that it is not a viewer-specific issue. If a dataset is used to populate a dynamic parameter list, and the dataset has a beforeOpen script that references some function defined in an external .js file, then it doesn't work, in both designer and viewer. It works if everything in the external .js file is copied into the beforeOpen script.
Sample report
sokann
It looks like the loadDesign() method in org/eclipse/birt/report/engine/api/impl/EngineTask.java is responsible to load in all the external .js files. The problem is that the parameters prompt comes first, before loadDesign() get called. Shall I file a bug report?
JasonW
Yes please log a bug for this.
Jason
sokann
Logged as
https://bugs.eclipse.org/bugs/show_bug.cgi?id=324546
JasonW
Thanks for logging the bug.
Jason