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)
Nested Table filled by Array
Simulant
<p>Hi, I have a problem creating my Report. I am using Eclipse BIRT Designer Version 4.3.1.</p><p> </p><p>My Datasource is a Collection from a MongoDB using the default driver. One document contains a date and an array of Objects containing an itemname (String) and a counter (Integer). The array has different length for different documents but always containing objects of the same sturcture.</p><p> </p><p>I want to display the Data in a Table, 1 row per MonogDB document. Fist column the date and the second column containing a nested Table for the Data inside the array (itemname and counter).</p><p> </p><p>I don't get it to work to create a scripted Data Source returning the rows for the nested Table i.e. the content of the array as rows.</p><p> </p><p>Could someone please show me how to split up the Array as Data Source so every Array item can be displayed in one row in the nested Table.</p>
Find more posts tagged with
Comments
micajblock
<p>I hope this will put you in the right direction. The below DevShare has a data source that is the parameter array.</p><p> </p><p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/devshare/_/designing-birt-reports/1621-automatically-display-all-parameters'>http://developer.actuate.com/community/devshare/_/designing-birt-reports/1621-automatically-display-all-parameters</a></p>
;
tdupouy
<p>Hi,</p><p>did you make it work? I have the same issue and I can't find how to convert this array into rows</p><p> </p><p>Thanks in advance for your help,</p><p>Best regards,</p>
micajblock
<blockquote class="ipsBlockquote" data-author="tdupouy" data-cid="127491" data-time="1398012528"><div><p>Hi,</p><p> I have the same issue and I can't find how to convert this array into rows</p></div></blockquote><p>Did you look at the DevShare?</p>
tdupouy
<p>Yes but sorry I just can't see how to bind my Mongo DataSet to the Parameter Data Set. Following the instructions I just got a table "ParameterName|ParameterValue|DisplayName|..."</p><p> </p><p>In fact I was just looking for a script at the table level, something like:</p><p><span style="margin:0px;background-color:transparent;color:rgb(0,0,139);">for</span><span style="margin:0px;background-color:transparent;"> </span><span style="margin:0px;background-color:transparent;">(</span><span style="margin:0px;background-color:transparent;color:rgb(0,0,139);">var</span><span style="margin:0px;background-color:transparent;"> i </span><span style="margin:0px;background-color:transparent;">=</span><span style="margin:0px;background-color:transparent;"> </span><span style="margin:0px;background-color:transparent;color:rgb(128,0,0);">0</span><span style="margin:0px;background-color:transparent;">;</span><span style="margin:0px;background-color:transparent;"> i </span><span style="margin:0px;background-color:transparent;"><</span><span style="margin:0px;background-color:transparent;"> myArrayFromMongo</span><span style="margin:0px;background-color:transparent;">;</span><span style="margin:0px;background-color:transparent;"> i</span><span style="margin:0px;background-color:transparent;">++)</span><span style="margin:0px;background-color:transparent;"> </span><span style="margin:0px;background-color:transparent;">{</span></p><p><span style="margin:0px;background-color:transparent;"> row["Name"] = </span>[font="Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"]myArrayFromMongo
[/font]</p><p>[font="Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"] row = [/font][font="Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"]myArrayFromMongo
[/font]</p><p>[font="Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"]...[/font]</p><p><span style="margin:0px;background-color:transparent;">}</span></p><p> </p><p>Is it possible or am I totally wrong?</p><p> </p><p>Rgds,</p>
micajblock
<p>I have not played with the MongoDB database. I am not sure how BIRT would use an array of objects in a Data Set.</p>
Simulant
<p>Sorry for not comning back. I did not get a notification about new posts.</p><p>I fixed it in my report with a lot of global consistent variables with the row number in the name for the variable and saving the counter of processed rows also in a variable, because input parameters did not work. I think noone wants to copy this, but it works for me.</p>