Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
How do I put generic code in a library
AlexAD
Hello.
I have 5 reports that uses repeating JavaScript logic. How do I put this logic in a library?
If not possible, are there other ways of putting generic JavaScript logic so that reports may use it?
Thank you in advance.
Find more posts tagged with
Comments
CBR
You can add a javascript file to any report or library. Just create a new .js file and add your generic functions to that file. Once you added that js file to your report or library you can simply call declared functions in your report.
See:
http://www.lebirtexpert.com/wordpress/2010/08/03/javascript-functions-lib/
for a tutorial.
AlexAD
Thank you very much, cbrell.
AlexAD
Regretfully, I couldn't use that method as the resources tab for rptlibrary contains no enabled areas.
Any guess why please?
CBR
What's your BIRT version?
AlexAD
I'm using Eclipse BIRT Designer Version 3.7.2.v20120213 Build
.7.2.v20120214-1408>.
AlexAD
I am sorry.
I managed to add .js file to the resources tab but the functions defined cannot be found.
CBR
Can you post a sample report with js file?
Where did you try to call the function?