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
OnFetch is not getting the value.
Migrateduser
<p>HI! Everybody. I'm having a problem with a simple math operation I want to add two fields and substract this from another. </p>
<p> </p>
<p>The structure of my report is: 3 dataSets. Dataset1=ShoppingInfo; Dataset2=PaymentsHistoryInfo; Dataset3=Operations.</p>
<p> </p>
<p>The fields involved are:</p>
<p>DataSet1-><span style="color:#ff0000;">Total</span> [is a single field]</p>
<p>DataSet2-><span style="color:#0000ff;">Previously_payed</span> [is a computed column an aggregation that sums everything on data base where the id of the receipt is less than the receipt that is being consulted]</p>
<p>DataSet3-><span style="color:#00ff00;">Current_amount_topay</span> [one single datafield]</p>
<p>Pendant-> Formatter.format(parseFloat(<span style="color:#ff0000;">Total</span>)- (parseFloat(<span style="color:#00ff00;">Current_amount_topay</span>)+<span style="color:#0000ff;">Previously_payed</span>) ,"$,000.00") (The calculation I want to do)</p>
<p> </p>
<p> </p>
<p> </p>
<p>As each Field (<span style="color:rgb(255,0,0);">Total</span>,<span style="color:rgb(0,255,0);">Current_amount_topay</span>,<span style="color:rgb(0,0,255);">Previously_payed) </span>is Set on different cells what I choose to do was global variables that are defined on scripts <strong>beforeOpen</strong> and <strong>onFetch</strong></p>
<p> </p>
<p> </p>
<p>In <strong>beforeOpen </strong>for each DataSet:<strong> </strong></p>
<p> </p>
<p>Total=[];</p>
<p>Previously_payed=[];</p>
<p>Current_amount_topay=[];</p>
<p> </p>
<p> </p>
<p>And on <strong>onFetch :</strong></p>
<p> </p>
<p>Total[Total.length]=row["MONTO_IRREGULARIDAD_RECUPERAR"];</p>
<p>Previously_payed[Previously_payed.length]=row["MONTO_descargado_anterior"];</p>
<p>Current_amount_topay[Current_amount_topay.length]=row["MONTO_enestaC"];</p>
<p> </p>
<p> </p>
<p> </p>
<p>Everything is ok if I substract Total-Current_amount_topay, But the Previously_payed variable is getting no value at all.</p>
<p> </p>
<p>What may I be doing wrong?</p>
<p> </p>
<p>Thanks in advance</p>
<p> </p>
<p> </p>
Find more posts tagged with
Comments
There are no comments yet