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
Add data row multiple times (interpolate)
Migrateduser
<p>Hi,</p>
<p> </p>
<p>I have to show records for future dates in my report. I can retrieve the current record and its interval, so I can calculate future values.</p>
<p> </p>
<p>I want to add this record multiple times to the dataset, but just with a different date field. I was hoping this is possible in the fetch script of the dataset, but I'm not sure how the 'new row' is triggered.</p>
<p> </p>
<p> </p>
<p>pseudo code:</p>
<pre class="_prettyXprint">
addRow()
row['id'] = getInt('id');
row['desc'] = getString('description');
row['startdate'] = getTimestamp('startdate');
cursor = getDate('startdate')
while(cursor < params['enddate']){
cursor.addDays(getInt('interval');
addRow();
row['id'] = getInt('id');
row['desc'] = getString('description');
row['startdate'] = cursor;
}</pre>
<p>I'm not sure if this is possible at all.</p>
<p>Another way would be to fill another dataset from within the fetch script of this datascript. But I'm not sure how to proceed here. Any thoughts / examples are very welcome.</p>
<p> </p>
<p> </p>
<p> </p>
Find more posts tagged with
Comments
There are no comments yet