Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
BIRT Top Of Page scripting
johnsonDMG
I have my "page break interval" at 40. I have a report element I want to script the suppression (i.e.) visibility based on the "page break interval" = 1. Is there a way to reference whether the "page break interval" is = 1?
Find more posts tagged with
Comments
mwilliams
Hi johnsonDMG,
When the page break interval equals 1? Or you want to know when the line number is 1 for the page? Let me know.
johnsonDMG
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="65799" data-time="1277155651" data-date="21 June 2010 - 02:27 PM"><p>
Hi johnsonDMG,<br />
<br />
When the page break interval equals 1? Or you want to know when the line number is 1 for the page? Let me know.<br /></p></blockquote>
<br />
Morning... I'm scripting for PDF output. I'd like to know when I'm at the top of the page (i.e.) line one. The scernerio is (not using grouping) i have report items that i want to toggle off an on visibility in my pdf output. In reponse to your question I guess either would work then the page break interval equals 1, or when the (printed pdf) line number is 1.
mwilliams
You can always increment your own variable in the onCreate of the row and reset it "onPageBreak" so that you always know when you hit the first line.
Hope this helps.
johnsonDMG
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="65979" data-time="1277756328" data-date="28 June 2010 - 01:18 PM"><p>
You can always increment your own variable in the onCreate of the row and reset it "onPageBreak" so that you always know when you hit the first line.<br />
<br />
Hope this helps.<br /></p></blockquote>
johnsonDMG
the OnCreate of the row... will that take into account rows in the table that are filtered out? Would you happen to have an example of how to do my own "printed" line count?
mwilliams
You can add an opposite condition of any visibility condition to your increment script so that you don't add the hidden rows. This would take care of that. What is your BIRT version? I'll make a quick example that shows a line counter that starts at 1 for each page.
johnsonDMG
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="66002" data-time="1277818031" data-date="29 June 2010 - 06:27 AM"><p>
You can add an opposite condition of any visibility condition to your increment script so that you don't add the hidden rows. This would take care of that. What is your BIRT version? I'll make a quick example that shows a line counter that starts at 1 for each page.<br /></p></blockquote>
<br />
<br />
I'm using version 2.3.0.v20080606. I guessing the script would go in the "on create" of the row because I want to reference rows that are actually written to pdf when I'm counting rows, and the "at break of page" would reset my cntr to zero or one. I want to make the distinction between rows that are in the table and those that are actually written out. I'm going to have a filter on the table so don't want to count rows that are not written.
mwilliams
johnsonDMG,
Take a look at this report. I initialized a variable, rowNumber = 0, in the initialize script of the report. I put a hide condition on the rows of the table to hide rows where the creditlimit is 0. Then, in the onCreate for the row, I incremented the rowNumber variable if the credit limit was not equal to 0. I also set the pageBreakInterval of the table to 0 and set my own page breaks so that there were 40 lines on each page rather than the hidden rows counting in the pageBreakInterval, but not in the row counter. If I did not do this, you'd have 35 lines on the first page, 30 on the second, 39 on the third, etc. Let me know if you have questions.