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)
Print empty lines when value in detail is null
RaniAg
I've a master detail report
In the master (one table) I show each customer once and in the detail (nested table) the orders.
Sometimes the detail is empty and I get an empty row in the detail.
The requirement is that when the detail is empty I want to print an empty line up to a maximum of 4 emptylines.. See my example. So if I've two orders for a client, I should print two additional empty lines. If I already have 4 orders, I don't need to print any additional line. If I've 1 order I should print 3 empty lines.
Is this possible?
I've tried a lot, without success.
See attachment as an example how it should be.
Thanks in advance
Find more posts tagged with
Comments
mwilliams
What's your BIRT version?
RaniAg
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="109369" data-time="1347636884" data-date="14 September 2012 - 08:34 AM"><p>
What's your BIRT version?<br /></p></blockquote>
Hi Williams,<br />
Mu version is 3.7.0v20110602<br />
<br />
Thanks in advance,
mwilliams
Take a look at this.
RaniAg
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="109435" data-time="1347902693" data-date="17 September 2012 - 10:24 AM"><p>
Take a look at this.<br /></p></blockquote>
<br />
<br />
This is what I need. Could you explain what you did?<br />
I see 5 rows with empty labels. How do you count to display them or not?<br />
<br />
Thanks in advance!
mwilliams
Take a look at the aggregation in the sub-table and at the visibility expression for each of the blank rows.
RaniAg
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="109775" data-time="1348624556" data-date="25 September 2012 - 06:55 PM"><p>
Take a look at the aggregation in the sub-table and at the visibility expression for each of the blank rows.<br /></p></blockquote>
Williams, thanks.<br />
I did, but I've one issue:<br />
When my detail is empty, meaning no rows at all in the detail table, then the empty rows are not being displayed. At the other hand when I've rows in the detail, the empty rows are being displayed correctly. <br />
I've explored in your example to find out if you do any additional when the aggregation is null or 0, but I didn't find any thing.<br />
Any ideas how you do this? In your example everything works smooth!<br />
<br />
Thanks in advance!
mwilliams
Make sure the extra rows are in the table footer, not the detail. If there are no detail rows, the footer will still show. The detail will not, so no matter what you do, you won't see extra detail rows.
shyamgoda
Hi MWilliams,<br />
<br />
I have a similar requirement, but the difference is that I need to insert additional Detail Rows within each Table-Group as if it came from the data-set, in addition to the actual data-set rows. This is to ensure that I always get a set of detail-rows in which I can push some pre-defined values.<br />
<br />
The higher purpose of this is that I want to prepare a chart on the aggregates based on the values in the complete set of rows (including data-set rows as well as the pre-fixed rows).<br />
<br />
For example, see the data in the below image. The dummy rows marked in yellow are inserted manually under each Key_Field (M-1,M-2), so that the ultimate grouping would get all the bucket values (B-1,B-2,B-3,B-4) with counts of Field_2 and Field_3 against each of these buckets.<br />
<br />
file:///D:/writable/BIRT/samples/extrarows.png <br />
<br />
<br />
Hope I could detail my requirement clearly.<br />
<br />
Please provide a lead. Thanks.
mwilliams
Not sure what happened with your upload. Can you try again?
shyamgoda
I am not getting any link for attaching the image, so tried inserting in the editor where it asks me for a URL.
mwilliams
Click on "add reply" rather than trying to use the "fast reply". After you choose the attachment file, be sure to select attach this file before adding the reply.
shyamgoda
Thanks. Attached now.<br />
<br />
<blockquote class='ipsBlockquote' data-author="'shyamgoda'" data-cid="109920" data-time="1348765077" data-date="27 September 2012 - 09:57 AM"><p>
Hi MWilliams,<br />
<br />
I have a similar requirement, but the difference is that I need to insert additional Detail Rows within each Table-Group as if it came from the data-set, in addition to the actual data-set rows. This is to ensure that I always get a set of detail-rows in which I can push some pre-defined values.<br />
<br />
The higher purpose of this is that I want to prepare a chart on the aggregates based on the values in the complete set of rows (including data-set rows as well as the pre-fixed rows).<br />
<br />
For example, see the data in the below image. The dummy rows marked in yellow are inserted manually under each Key_Field (M-1,M-2), so that the ultimate grouping would get all the bucket values (B-1,B-2,B-3,B-4) with counts of Field_2 and Field_3 against each of these buckets.<br />
<br />
file:///D:/writable/BIRT/samples/extrarows.png <br />
<br />
<br />
Hope I could detail my requirement clearly.<br />
<br />
Please provide a lead. Thanks.<br /></p></blockquote>
mwilliams
You're probably looking at a joint dataSet. If you're using SQL and can access all of this data in a single dataSet, you can probably just write a slightly more complex query to add the rows to your dataSet instead.
shyamgoda
Hi Williams,
I thought of extending the data-set, but the problem is that I wouldn't know how many Key-Field values would come out of the main dataset (M-1, M-2, M-3, .....), so it becomes difficult to add the additional rows in the data-set for each of the M-X groups.
Let me know another way by which I can add a fixed number of additional rows within each group, so that at least one record for each bucket (B-1, B-2, B-3, B-4) would exist under each M-1, M-2, etc. The difference here against the earlier depiction is that I will always add 4 rows for each group, irrespective of the Bucket values obtained from dataset and the gaps therein.
Thanks.
mwilliams
Using a scripted dataSet to take the values from the original dataSet, then add the necessary fixed rows would work. You'd just use the onFetch of your original dataSet to store your resultSet into an array. Then, you'd use this array to create a scripted set, adding rows where necessary.
shyamgoda
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="109967" data-time="1348836040" data-date="28 September 2012 - 05:40 AM"><p>
Using a scripted dataSet to take the values from the original dataSet, then add the necessary fixed rows would work. You'd just use the onFetch of your original dataSet to store your resultSet into an array. Then, you'd use this array to create a scripted set, adding rows where necessary.<br /></p></blockquote>
<br />
Thanks, I was looking for such solution. Please direct me to some samples of scripted dataSet.
mwilliams
Here is a devShare post showing a scripted dataSource:
http://www.birt-exchange.org/org/devshare/designing-birt-reports/544-sample-birt-scripted-data-source-example/
RaniAg
Williams,
I observed that some posts have been omitted in this topic.
I had an additional question about the footer in a report.
In my table footer I've a a detail table, that I want to display on every page.
Last week you told me that it is not possible to repeat the footer of a table on every page, because this is only being displayed at the end of the table ( on the other hand, a header of a table presents itself on each page)
You gave me two options:
to make us of the master page footer. Since I'm using master detail between two tables I'm not able to use this alternative
You also gave an option to present the exact number of rows on each page and then the footer would present itself on each page. (not exact your words, but in this direction you reacted)
Could you explain the number of row being presented in the tables in more detail?
many many thanks!
shyamgoda
Sorry for interrupting into the main query of RaniAg. I just wanted to inform that I was able to resolve my query for additional dummy rows through SQL itself as advised by Williams (little more complex, as you said it). Thanks a lot.
mwilliams
<blockquote class='ipsBlockquote' data-author="'RaniAg'" data-cid="110028" data-time="1349098480" data-date="01 October 2012 - 06:34 AM"><p>
Williams,<br />
I observed that some posts have been omitted in this topic.<br />
I had an additional question about the footer in a report. <br />
In my table footer I've a a detail table, that I want to display on every page.<br />
Last week you told me that it is not possible to repeat the footer of a table on every page, because this is only being displayed at the end of the table ( on the other hand, a header of a table presents itself on each page)<br />
<br />
You gave me two options:<br />
to make us of the master page footer. Since I'm using master detail between two tables I'm not able to use this alternative<br />
<br />
You also gave an option to present the exact number of rows on each page and then the footer would present itself on each page. (not exact your words, but in this direction you reacted)<br />
<br />
Could you explain the number of row being presented in the tables in more detail?<br />
<br />
many many thanks!<br /></p></blockquote>
<br />
Sorry. I moved it off to a new topic, since it was unrelated to the topic in this thread. Here's the link:<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/org/forum/index.php/topic/27906-show-footer-data-at-the-bottom-of-each-page/'>http://www.birt-exchange.org/org/forum/index.php/topic/27906-show-footer-data-at-the-bottom-of-each-page/</a>
;
mwilliams
<blockquote class='ipsBlockquote' data-author="'shyamgoda'" data-cid="110031" data-time="1349099193" data-date="01 October 2012 - 06:46 AM"><p>
Sorry for interrupting into the main query of RaniAg. I just wanted to inform that I was able to resolve my query for additional dummy rows through SQL itself as advised by Williams (little more complex, as you said it). Thanks a lot.<br /></p></blockquote>
<br />
Glad you got it working! Let us know whenever you have questions!
omegaomega
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="110032" data-time="1349099335" data-date="01 October 2012 - 06:48 AM"><p>
Sorry. I moved it off to a new topic, since it was unrelated to the topic in this thread. Here's the link:<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/org/forum/index.php/topic/27906-show-footer-data-at-the-bottom-of-each-page/'>http://www.birt-exchange.org/org/forum/index.php/topic/27906-show-footer-data-at-the-bottom-of-each-page/</a><br
/></p></blockquote>
<br />
OK. I'll comment over there.<br />
Thanks