I had to employ the following technique to get SCR to repeat info about a record on subsequent pages (when the record in question ran for more than a single page). I don't know if this is the right way to do it, but it works:
In the Details section, RECORD ONE contains the name of an organization and some additional info. RECORD ONE normally only occupies slightly less than a page -- but in some cases, RECORD ONE runs to a second page (or even a third page). RECORD TWO always starts on a new page, so you never have a record beginning near the bottom of a page.
When RECORD ONE extends to a second (or third) page, I want to have the name of the organization appear in small type at the bottom of all of the subsequent pages. Here's what I did:
First, I created a string variable called @FOOTER_NAME, simply declaring it:
shared stringVar footer_name ;
Next, I created a formula called @switch_footer with the following statements:
whileprintingrecords ;
if({xxx.ORG_NAME} <> shared stringVar footer_name) then
shared booleanVar switch_footer := TRUE ;
shared stringVAr footer_name := {xxx.ORG_NAME} ;
I put this formula in the DETAILS section alonside the actual field {xxx.ORG_NAME} and suppressed it.
Next, I created a page footer that contained the string variable @FOOTER_NAME and then specified that the footer should be suppressed if @switch_footer = TRUE
(at this point, the footer would never be displayed, because @switch_footer would always be TRUE)
Finally, I created a second page footer (below the first page footer) and inserted a formula called @switch_back. This formula contained the following statement:
whileprintingrecords ;
shared booleanVar switch_footer := FALSE ;
I suppressed this second page footer.
Now, when I run the report, the variable FOOTER_NAME will not show on the first page (i.e., the one that contains the actual organization name at the top), but it will show on every subsequent page, until a new organization name is listed (at which point @switch_footer will change from FALSE to TRUE).
Did I do too much, or is this the right way to proceed? I am curious because, even though it seems to work just fine, I may be using variations on this technique in the future, so I would like to know at this stage whether or not I should be doing something else.
In the Details section, RECORD ONE contains the name of an organization and some additional info. RECORD ONE normally only occupies slightly less than a page -- but in some cases, RECORD ONE runs to a second page (or even a third page). RECORD TWO always starts on a new page, so you never have a record beginning near the bottom of a page.
When RECORD ONE extends to a second (or third) page, I want to have the name of the organization appear in small type at the bottom of all of the subsequent pages. Here's what I did:
First, I created a string variable called @FOOTER_NAME, simply declaring it:
shared stringVar footer_name ;
Next, I created a formula called @switch_footer with the following statements:
whileprintingrecords ;
if({xxx.ORG_NAME} <> shared stringVar footer_name) then
shared booleanVar switch_footer := TRUE ;
shared stringVAr footer_name := {xxx.ORG_NAME} ;
I put this formula in the DETAILS section alonside the actual field {xxx.ORG_NAME} and suppressed it.
Next, I created a page footer that contained the string variable @FOOTER_NAME and then specified that the footer should be suppressed if @switch_footer = TRUE
(at this point, the footer would never be displayed, because @switch_footer would always be TRUE)
Finally, I created a second page footer (below the first page footer) and inserted a formula called @switch_back. This formula contained the following statement:
whileprintingrecords ;
shared booleanVar switch_footer := FALSE ;
I suppressed this second page footer.
Now, when I run the report, the variable FOOTER_NAME will not show on the first page (i.e., the one that contains the actual organization name at the top), but it will show on every subsequent page, until a new organization name is listed (at which point @switch_footer will change from FALSE to TRUE).
Did I do too much, or is this the right way to proceed? I am curious because, even though it seems to work just fine, I may be using variations on this technique in the future, so I would like to know at this stage whether or not I should be doing something else.