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)
How to setup table scroll?
DavidBirt
Hi there
I use BIRT 2.5.1 currently. I want to know how to control table scroll horizontally like overflow property for table in BIRT 2.6+.
Set overflow is true for table property in BIRT 2.5.1,it cann't work.
Please give a hand.
Find more posts tagged with
Comments
mwilliams
Are you talking on a table cell or on the entire table?
DavidBirt
Hi mwilliams
the entire table.please help me.thanks.
mwilliams
In 2.6.2, if I put the table in a grid and set the grid's overflow setting to "scroll", I get a horizontal scroll bar to allow me to see the whole table.
DavidBirt
Hi mwilliams
Thanks for your reply.
I know your mean.Only in 2.6.2 and above version,BIRT supports "overflow" in grid.
Maybe i had a wrong described.Sorry.
The 2.5.1 version that i used doesn't support "overflow" in the grid. I wonder how to get a horizontal scroll bar in 2.5.1 without "overflow" property.
Best regards
DavidBirt
Divya Raj
<blockquote class='ipsBlockquote' data-author="'DavidBirt'" data-cid="100073" data-time="1336455670" data-date="07 May 2012 - 10:41 PM"><p>
Hi mwilliams<br />
<br />
Thanks for your reply.<br />
<br />
I know your mean.Only in 2.6.2 and above version,BIRT supports "overflow" in grid. <br />
Maybe i had a wrong described.Sorry. <br />
<br />
The 2.5.1 version that i used doesn't support "overflow" in the grid. I wonder how to get a horizontal scroll bar in 2.5.1 without "overflow" property.<br />
<br />
Best regards<br />
<br />
DavidBirt<br /></p></blockquote>
Divya Raj
Hi mwilliams
Could you please help me for adding scroll bars for a table cell?
Regards,
Divya
mwilliams
Divya,
If you set the overflow property of the table cell to "scroll" and make sure the whitespace setting of your element in the cell is set to no wrapping, you should get a scroll bar for the table cell. Let me know if this doesn't work. If it doesn't, I'll take a closer look, but I think this is right.
mwilliams
DavidBirt,
So, you're wanting to know in 2.5.1, how to do this? I thought you were just asking how it works in 2.6 and above because it doesn't work in your version.
Let me know.
DavidBirt
Thanks mwilliams. You are so cool.
Divya, the way what mwilliams said is right.I had a try.It's ok.You can do it.
mwilliams
DavidBirt,
I've tried a few things with 2.5.1, with no success. The only way I can think of that will work for sure is to hide your BIRT designer table and build your own table in script and display it using a HTML text box. You can place this text box in the footer of your table and just hide the header and detail rows. You'd build your HTML table by grabbing the values in the onCreate scripts of each element in your table.
Let me know if you need a better explanation of this!
Go forward
HI Williams, David,
To Williams, Could you please make me an example of what you have said?
BIRT V 3.7
kclark
GoForward,<br />
I attached a sample report doing what Michael suggested. I created an html table inside of onCreate()<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
var tempData = reportContext.getGlobalVariable("newTable");
tempData = tempData + "<tr><td>" + this.getValue() + "</td></tr>";
reportContext.setGlobalVariable("newTable", tempData);
</pre>
<br />
and I was able to call that data from a text object.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<value-of format="HTML">reportContext.getGlobalVariable("newTable") + "</table>";</value-of>
</pre>
<br />
I then added the scroll bars in the xml file using the overflow option.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<text name="myTable" id="90">
<property name="overflow">scroll</property>
<property name="contentType">html</property>
<text-property name="content"><![CDATA[<value-of format="HTML">reportContext.getGlobalVariable("newTable") + "</table>";</value-of>]]></text-property>
</text>
</pre>
Go forward
The Oncreate() of wich element ?
The table you have dragged from the palette or the textbox ?
kclark
Sorry, I forgot to say which element
<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
var tempData = reportContext.getGlobalVariable("newTable");
tempData = tempData + "<tr><td>" + this.getValue() + "</td></tr>";
reportContext.setGlobalVariable("newTable", tempData);
</pre>
<br />
That goes inside of the onCreate() of the data element you dragged to the table from you dataset. So in my case it was inside the onCreate() of [JOBTITLE]
Go forward
HI Kclark
Thank's for replying, could you attach the report cause there is no attached report so I can see the changes on the example and the xml file too please.
Thank's
kclark
I attached a report for you to look at, let me know if you have any questions.
Go forward
HI Kclark
I did the same thing with my report but it dos not work,
I had create I data source and a dataset called My DataSet in the report you give me
with a new table under your table, then I could see the table scroll, but not all the elements
of my Table were displayed!
So it's working very well.
Any suggestion
Thank's
Please take a look at this rptdesign file wich is your with a table added from my datasource.
kclark
goforward -- I downloaded your rptdesign and everything seems to be working fine on my end. What data are you missing in your report?
Go forward
Kclark
The table does not display all the data,
for exemple supposing I have 100 rows of data that should be displayed,
only 70 rows are displayed in my scrollable table and the rest
i have to go the page 2 of 1 in my birt viewer so I can visualize
the rest of my Table.
Hope you understood what I come to explain.
Please take a look at these attached pictures to understand my problem.
I wish I could have all my data in the scrollable table without moving to
the next pages through the birt viewer.
kclark
I see what your saying, I solved this by setting the page break interval of the table to allow for all of the records. In my case I gave it the value of 500.
Go forward
I found a solution to my problem,
I made the page break interval property of the table to 0, then
I could display all the data on one page.
Got it.
Thank's in advance kclark
suhas5001
<p>I am not getting horizontal and vertical scroll bar,,,,plz provide me exact steps.</p>