Home
Analytics
Using Java Script from js File
Neethu
I have a report which uses a simple java script function that convert numbers to words. This function is in a js file. When I run the report from birt eclispe(Inigo), on the lables render event in scrip i'm giving import statement and the function call as follows:
importPackage( Packages.script.* );
this.text = toWords(row["paid_amount"]);
but when i integrate this report with my web application in tomcat it is not showing the lable. Where as in my application i have a scripts folder which contains the js file. I think it is unable to fin the path of the scripts packages. How should I tell the report from where to take the js file. Can any one please guide me
Find more posts tagged with
Comments
mwilliams
Are you placing the js file in your resource folder?
mcremer
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="81650" data-time="1313671936" data-date="18 August 2011 - 05:52 AM"><p>
Are you placing the js file in your resource folder?<br /></p></blockquote>
<br />
An example of what Wilams is talking about you can look at the manual of the BIRT Chart Da Vinci.<br />
<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1313-build-professional-looking-charts-with-birt-chart-da-vinci/'>http://www.birt-exchange.org/org/devshare/designing-birt-reports/1313-build-professional-looking-charts-with-birt-chart-da-vinci/</a>
;