Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Records on one row?
Macamba
How does one get fields that belong to each other on the same line? <br />
<br />
At the moment my report looks like:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
System Month Priority Downtime
System 1
1
Prio1
304
2
Prio1
197
Prio2
70</pre>
<br />
I would like it to display like:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>System Month Priority Downtime
System 1 1 Prio1 304
2 Prio1 197
Prio2 70</pre>
<br />
Thanks
Find more posts tagged with
Comments
Macamba
FWIW, the design looks like:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
[system] group header row (sysem)
[month] group header row (month)
[priority] group header row (priority)
[avg] detail row
group footer row (priority)
group footer row (month)
group footer row (system
footer row
</pre>
Macamba
I found the <a class='bbc_url' href='
http://stackoverflow.com/questions/2474541/how-do-we-group-in-birt-without-wasting-lines-and-still-only-printing-the-group'>answer</a>
. I moved System, month and priority to the same line as the downtime. It now looks like:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>group header row (sysem)
group header row (month)
group header row (priority)
[system] [month] [priority [avg] detail row
group footer row (priority)
group footer row (month)
group footer row (system
footer row</pre>
<br />
However, if I now select the system, month and priority column, and set the 'suppress duplicates' in the 'advanced' properties to true, the duplicates are still shown.
mwilliams
This is probably because of your grouping. If details within the most inner group had multiple values in a row, they'd be supressed. You could do your suppression manually by using the visibility property for each data element and a variable that holds the last value to know when to hide the current value.
Hope this helps.
Macamba
Thanks. In the end I found out that I got what I wanted by dragging the dataset to the Report Editor.
kpelzer29
I have a report with a similar issue. Can you please give an example of how you would create and assign a value to a variable that holds the last value to know when to hide the current value?<br />
<br />
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="69088" data-time="1286376430" data-date="06 October 2010 - 07:47 AM"><p>
This is probably because of your grouping. If details within the most inner group had multiple values in a row, they'd be supressed. You could do your suppression manually by using the visibility property for each data element and a variable that holds the last value to know when to hide the current value.<br />
<br />
Hope this helps.<br /></p></blockquote>
mwilliams
kpelzer29,
In your initialize script of your report, you could initialize a variable called temp to "".
temp = "";
Then, in your visibility script of your element, you could check the current value compared to temp. If they were the same, you'd continue to hide the value. If they were different, you'd set temp to the current value for use of checking next value and not hide the current element.
kpelzer29
Hi mwilliams,<br />
<br />
When you say "visibility script of your element", do you mean select the data element in the table, go to Properties -> Visibility and then enter an expression in the textbox? That's what I did and I am not able to get it to work correctly. Would it matter that I am using groups in the table?<br />
<br />
<br />
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="69916" data-time="1288642402" data-date="01 November 2010 - 01:13 PM"><p>
kpelzer29,<br />
<br />
In your initialize script of your report, you could initialize a variable called temp to "".<br />
<br />
temp = "";<br />
<br />
Then, in your visibility script of your element, you could check the current value compared to temp. If they were the same, you'd continue to hide the value. If they were different, you'd set temp to the current value for use of checking next value and not hide the current element.<br /></p></blockquote>
mwilliams
It shouldn't, I don't think. Can you reproduce what you've done with the sample database and post the report in here. Let me know your BIRT version as well. Thanks!
kpelzer29
I was able to create a report with the sample database and now the output report seems to be working, but I am getting 86 error messages. <br />
<br />
The majority of the error messages are: <strong class='bbc'>Can not convert the value of <em class='bbc'>row["CONTACTLASTNAME"]</em> to Boolean type. </strong><br />
Instead of <em class='bbc'>row["CONTACTLASTNAME"]</em>, the actual last name is included in the error message.<br />
<br />
The last error message includes the following: <br />
<br />
<strong class='bbc'><em class='bbc'>The following visibility expression does not evaluate to a legal boolean value: if (row["CONTACTLASTNAME"] == temp)<br />
{<br />
true;<br />
}<br />
else<br />
{<br />
false;<br />
temp = row["CONTACTLASTNAME"]<br />
}</em></strong><br />
<br />
I am thinking maybe some of the error messages are because I am assigning the value of the row to the temp global variable in the expression in the Visibility property when the current row does not equal the temp global variable. Is there another place I can assign the value?<br />
<br />
I am using BIRT version 2.6.1.<br />
<br />
Thank you for your help!<br />
<br />
<br />
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="69921" data-time="1288647342" data-date="01 November 2010 - 02:35 PM"><p>
It shouldn't, I don't think. Can you reproduce what you've done with the sample database and post the report in here. Let me know your BIRT version as well. Thanks!<br /></p></blockquote>
mwilliams
Without opening this and trying it, I'm guessing the issue is coming because you're returning temp = row["CONTACTSLASTNAME"] after putting your return value of false that you want, so it's telling you that the last name is not a valid boolean value. If you switch that around and put "false" below the "temp =row..." you should get rid of those errors. When you do this, does it work as expected?