I am customizing our MICR check. We often print hundreds of checks. Some of the checks pay many remit-to's and so the remit lines don't all fit on one page so there is overflow. We need to print VOID over the check itself, which is in the HEADER on the second and subsequent pages for that check.
I wrote a visibility expression as follows:
=Iif(Globals!PageNumber > 1, False, True)
What that accomplished was hiding it on page 1 of the print job. The problem is that most pages after page 1 were new checks and shouldn't be voided. Only the second page from the same check should.
I need to do this on a control break where he check number changes. I should only print VOID when the current page has the same check number as the previous page. Since this is in the header, the check number refers to a hidden field in the body:
=reportitems!txtCalc_DspCheckNum21.value
I would compare this value to the previous check number but how do I store that previous check number and now compare the two?
I added a text box (very large letters) over the check and hid it. I then
You'll probably need to set this up using custom code.
In your Report Properties-Code page, insert the following code:
Now for your Textbox
txtCalc_DspCheckNum21give it the expression:In your header, set the image Visiblility-Hidden expression to:
So what we are doing is that whenever your Textbox
txtCalc_DspCheckNum21gets rendered, it remembers the previous and current check numbers. If they are different (i.e. the first page for that cheque) it hides the image and if they are the same, it shows the VOID image (i.e. subsequent pages for that cheque).Note that this relies on
txtCalc_DspCheckNum21being rendered on every page.