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)
find out number of pages before a report renders
cmrdjr
I need to find out how many pages will be returned in my output prior to the rendering and if the number of pages is greater than a static number then display a message in the report output instead of rendering the report.
Is this possible?
BIRT version 2.5.1
Find more posts tagged with
Comments
mwilliams
Hi cmrdjr,
If you set a limit of rows per page, you can figure out how many rows are in your dataSet and then be able to determine the amount of pages that will be displayed. Hope this helps.
cmrdjr
With this report that approach is not available as these are financial statements where each statement (regardless of its length) is on a single BIRT viewer page.
The user can select any combination of the 8 reports listed below and return them in a variety of ways: by organization (only 8 pages), by account (with a list) - multiple pages, or by account/sub-account (with a list) - even more pages.
Some of the organizations have hundresd of sub-accounts and the reports will not render. In fact they have been known to crash the server that runs our Enterprise Reporting environment. One option that was proposed was to find out how many pages would be rendered based on which reports were chosen and the other parameters entered by the user. If the number of pages was larger than the 'breaking point' number, then return a message in the report output that says they will not be getting a report output with the given parameters they used.
The row count in the sql is not a good indicator because one of the orgs if run by account/sub-account produces over 3000 BIRT pages, but has less than 3000 rows of data returned. The sql completes very quickly but the rendering of the report eats memory and cpu resources. The server admins need to get this resolved because when the memory and cpu are used up the server crashed and must be re-booted. This is not a good option since the server is enterprise wide.
Balance Sheet
Balance Sheet Exec Summary
Income Statement by object code - Year to period
Income Statement by object level - Year to period
Income Statement Exec summary - Year to period
Income Statement by object code - Current period
Income Statement by object level - Current period
Income Statement Exec summary - Current period
Let me know if this is confusing because it is really hard to explain without diagrams.
cmrdjr
Any ideas anyone??
johnw
You need to use a little Java/Javascript trickery to get access to that parameter. This cannot be used to do things like display total pages in a report since the events that you need to put it in happen after presentation layer creation, but for your purposes it should work just fine. Not sure that I ever posted this to the Devshare though.<br />
<br />
<a class='bbc_url' href='
http://digiassn.blogspot.com/2009/07/birt-using-reflection-to-get-total-page.html'>The
Digital Voice: BIRT: Using Reflection to get Total Page Count</a>
cmrdjr
Thanks so much! I will take a look at this. <br />
<br />
If you haven't posted this in the DevShare you might want to consider it because there is a contributor of the month contest. <br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/wiki/DevShare_Contributor_of_the_Month_Contest/'>DevShare
Contributor of the Month Contest - BIRT Wiki - BIRT Exchange</a>