Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » getting row count of table/dataset
getting row count of table/dataset [message #1058557] Tue, 14 May 2013 09:04 Go to next message
nari noori is currently offline nari noori
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] Tue, 14 May 2013 23:38 Go to previous message
Michael Williams is currently offline Michael Williams
Messages: 1424
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
Actuate – The BIRT Company™

BIRT Developer Center
Check out the new, free BIRT Viewer Toolkit
Previous Topic:BIRT Scripted data source
Next Topic:don't want Parameters to be mandatory
Goto Forum:
  


Current Time: Sun Apr 20 23:02:23 EDT 2014

Powered by FUDForum. Page generated in 0.02066 seconds