>>>Give this a try:
>>>
>>>Create a report variable called rnGrpLines, set the Calculate option to Count, and set it to reset at the Data Group.
>>>
>>>In the Group Header, make the expression for company be as follows:
>>>alltrim(company) + IIF(rnGrpLines = 0, "", " -- continued")
>>>
>>>
>>>Cathy
>>
>>Hi Cathy,
>>
>>This worked very well indeed, thanks a lot. However, I can not make the other part of the trick work for me. I also want to have "continued on the next page" printed on the page that is going to span two pages. I put
>>IIF(rnGrpLines > 0, "", " continued on the next page") and set variable to 0 in the Group Footer onExit, but it doesn't print.
>>
>>I have two groups. Just in case I created a separate variable for the inner group and tried to combine both using OR condition, but it still doesn't want to print.
>>
>>What can I do to make it print?
>>
>>Thanks in advance.
>
>In older times this kind of tricks was accomplished by following approach:
>1. You run your report two times
>2. You have some calls from appropriate band e.g. group header/footer in your request) onExit or onEntry that will fill some extra field in your cursor. This calls will be fired only when you run it first time.
>3. So after first run your cursor has information which group will span more than one page (you keep _PAGENO in the cursor)
>4. During your second (actual) run you use that extra field to print whatever you want.
Hi Ed,
I actually almost got it working now, but not quite yet. First of all, my mistake of putting the field into Group Footer instead of Report Footer (Cathy just gave me a hint in her e-mail). But it still doesn't always print for me and now it is also printing on the last page of the report. The last problem would be easy to fix, I think.
UPDATE. After several more attempts to make it work, I think I'll abandon this idea. Can not have both - no orphan group footers and "continued on the next page" message.
If it's not broken, fix it until it is.
My Blog