<p>Hi,</p>
<p> </p>
<p> </p>
<p>I have a jar file added to my report. It is a pojo class' jar which contains a hashmap - keys represent column position and value represents column name - for the dynamic report.</p>
<p> </p>
<p> </p>
<p>I have added the jar to "Resources" of rptdesign.</p>
<p> </p>
<p>Trying to create an object of the class is throwing error :</p>
<p> </p>
<p><strong><em>importPackage(Packages.com.demo.abc);</em></strong></p>
<p><strong><em>var obj= new MyClass1(); <span style="font-size:12px;">// the .jar of the class "MyClass1" is added to the rptdesign</span></em></strong><span style="font-size:12px;"><strong><em> </em></strong></span></p>
<p><strong><em>sortedMap = new TreeMap(obj.hmap); <span style="font-size:12px;">// hmap is the hashmap in the class "MyClass1"</span></em></strong></p>
<p> </p>
<p><u>Error </u>- <span style="color:#b22222;">ReferenceError: "MyClass1" is not defined. (/report/method[
@name="beforeFactory"]#5)</span></p>
<p> </p>
<p> </p>
<p>On
@pricher's suggestion I tried this :</p>
<p> </p>
<p><span style="color:#000000;"><em><strong>var obj= new com.demo.abc.MyClass1(); <span style="font-size:12px;">//the .jar of the class "MyClass1" is added to the rptdesign</span></strong></em></span></p>
<p> </p>
<p> </p>
<p><u>Error </u>- <span style="color:#b22222;">TypeError: [JavaPackage com.demo.abc.MyClass1] is not a function, it is object. (/report/method[
@name="beforeFactory"]#7)</span></p>
<p> </p>
<p> </p>
<p><strong><u>BIRT 4.3.2</u></strong></p>
<p><strong><u>java 1.8</u></strong></p>