Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
using loops in birt
dairywhizz
folks
i have a requirement to display a row of data based as many times as the quanity of a field value in that data
ie
item description quantity
100 welder 3
and display it 3 times as per the quantity shown ie 3
like so
100 welder 3
100 welder 3
100 welder 3
i used a loop in actuiate 7,8 how and where do i perform such a method in birt?
all help will do
roger
Find more posts tagged with
Comments
mwilliams
Hi Roger,
You could probably use a scripted dataSet to step through your data and duplicate each row the specified amount of times for your dataSet.
dairywhizz
michael
thanks for the reply,have you perhaps got an example how to create this scripted dataset for the quantities
all help will do
mwilliams
Roger,<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.com/devshare/designing-birt-reports/544-sample-birt-scripted-data-source-example/#description'>Here</a>
; is an example report from the devShare that uses a scripted dataSet. You should just have to pass your data through a function that reproduces the current line of data as many times as the quantity field says for your dataSet.
dairywhizz
Michael
how and where do i create the fucntion to duplicate the rows then?
curious
mwilliams
Roger,
You could probably either do it in the javascript of the dataSet or in an external java class.