Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Problems with report after adding script
Migrateduser
<p>I have a report that I have been working on in BIRT Designer Pro. Essentially I am trying to compute t-statistics for groups in the report. The report that displays groups works just fine.</p><p> </p><p>So then I put the following script in the Count aggregate element:onCreate event in the group footer of the table:</p><p>The averages, standard deviations and counts are computed via aggregate functions in the footer. </p><p>The function tStat is in the report initialize event.</p><pre class="_prettyXprint _lang-js">grp = this.getRowData().getColumnValue("group");if(grp=="Treatment Group"){ avg_fu1_tx=this.getRowData().getColumnValue("avg_fu1"); std_fu1_tx=this.getRowData().getColumnValue("std_fu1"); cnt_fu1_tx=this.getRowData().getColumnValue("cnt_fu1"); } if(grp=="Control Group"){ avg_fu1_ctl=this.getRowData().getColumnValue("avg_fu1"); std_fu1_ctl=this.getRowData().getColumnValue("std_fu1"); cnt_fu1_ctl=this.getRowData().getColumnValue("cnt_fu1"); } t1 = tStat(avg_fu1_tx, avg_fu1_ctl, std_fu1_tx, std_fu1_ctl, cnt_fu1_tx, cnt_fu1_ctl); Packages.java.lang.System.out.println("t1 = " + t1); reportContext.setPersistentGlobalVariable("fu1_t",t1.toString()); myVar = reportContext.getPersistentGlobalVariable("fu1_t"); Packages.java.lang.System.out.println("myVar = " + myVar);</pre><p>Now, I *know* that this script works because the console output I get when I run this is:</p><p> </p><p>t1 = -1.07629976</p><p>myVar = -1.07629976 (I put myVar in this script to recall the PGV just to see if that part was working ok.)</p><p> </p><p>But when I run this report I get the error:</p><p>[color=#ff0000;]There is an error in processing your request. Error code 17070.[/color]</p><p> </p><p>So what could be happening here? i.e. The report runs fine with no script, then I put in a script that appears to work fine and the report blows up.</p><p> </p><p>Any help would be appreciated.</p><p> </p><p> </p>
Find more posts tagged with
Comments
There are no comments yet