Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » getting row count of table/dataset
getting row count of table/dataset [message #1058557] Tue, 14 May 2013 13:04 Go to next message
nari noori is currently offline nari nooriFriend
Messages: 33
Registered: November 2012
Member
Hi,
im using birt 4.2.

i want to achieve this:
my report has one table. if the user tries to export a report to excel that has over 1000 rows, hide the report table and show a custom message in excel to user: Dear user, you are not allowed to export a report to excel that has over 1000 rows, use csv export instead)


Therefore i set the visibility(under properties) on table to hide the table when Total.count()>1000.

So far so good. Then i have made dynamic-text that says (Dear user, you are not allowed to export a report to excel that has over 1000 rows, use csv export instead). I want to set its visibility only to excel, but i am not able to use Total.count() outside the table.

How to get the table's row count outside the table ?


i have also tried to set the total count in different table-events:
reportContext.setGlobalVariable("numberofrows", Total.count());

and trying to get the variable in a dynamic text, but the variable always retrns null:
reportContext.getGlobalVariable("numberofrows");
Re: getting row count of table/dataset [message #1058778 is a reply to message #1058557] Wed, 15 May 2013 03:38 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Is the dynamic text you're trying to grab the value from after the table? If not, that might be the issue. Let me know.

Michael

Developer Evangelist, Silanis
Previous Topic:BIRT Scripted data source
Next Topic:don't want Parameters to be mandatory
Goto Forum:
  


Current Time: Fri Apr 26 14:47:23 GMT 2024

Powered by FUDForum. Page generated in 0.03010 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top