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)
Show X amount of Row's on a Table
Brasi
I'm trying to get a minimum of X amount of rows to popup on my table. ATM I?ve done it by starting a counter as the report begins, and everytime a detail is added I have my counter go up one. I then add X number or rows and put a conditidion to only hide it if counter>X. The problem is, if I want 20 rows to be seen at least I have to add these 20 rows manually and I'm hoping that there is a faster and more practical way of doing it.
Thanks,
Brasi
Find more posts tagged with
Comments
mwilliams
Do they have to be alternating color to where you'd have to manually add the extra rows? Or can you just extend the table using html in a text box?
Brasi
No need to alternate colors. I just need around 20 rows (what I need is more like 20 lines, like a grid, to be shown if it has data or doesn?t. But I need to show 25 if 25 have data with a least of 20 lines shown. Do I make sense?).
mwilliams
Take a look at this devShare example. It shows how to use a HTML textbox to extend a table. You could change it up a little bit and get it to number up to 20 for you if less than 20 results. Then, if you have more than 20 results, you'd just need a page break interval set for your table of 25 so that only 25 show on a page. If 25 is the maximum, just use a filter to only show 25. Let me know if you have questions.
http://www.birt-exchange.org/org/devshare/designing-birt-reports/989-extend-table-to-fit-page/
Hans_vd
Hi Brasi,
What database are you on?
Brasi
sorry, been away the last few days. Thanks for the tips, will take a look and I'm using a sql server db. once again, thanks!
Brasi
can I find an example of this in Birt 2.3.2 version? thanks.
mwilliams
Try just changing the version info in the first few lines of the xml source to match that of the xml source in your other reports. This might allow you to open it. Let me know.
Brasi
Mike, I got it to work with your suggestion. And that does solve my problem. Adding style I can line up my table too. thanks for the help!!
mwilliams
Great to hear! Let us know whenever you have questions!
Brasi
this is how my code ended up looking like (the html in footer)
<VALUE-OF format="HTML">
extendTable="<table width=100% cellspacing=0 cellpadding=0 >";
while (rowCount < maxRows){
extendTable = extendTable + "<tr><td style='border-bottom-style:solid;border-bottom-color:#000000;border-bottom-width:1px;'> </td></tr>";
rowCount++;
}
extendTable + "</table>";</VALUE-OF>
puting it this way works web and pdf, if you use <td style='border-bottom: solid 1px #000000;'> it works web but not pdf.
mwilliams
So, you want a line for each row? If so, and it's not working for PDF, this approach might not work. Let me know and I'll take a look.
Brasi
the shorter version doesn't work (<td style='border-bottom: solid 1px #000000;'>), but if you specify the style for the border for each attribute (td style='border-bottom-style:solid;border-bottom-color:#000000;border-bottom-width:1px;'>) it works on both web and pdf. It's all working for me now. Thanks Michael.
mwilliams
Awesome!