Previous Incomplete: Putting Group Footer on Page Bottom Through Rap

edited November 2009 in RAP
Hi There,

Sorry Previous post was incomplete

I found an excellent article of rbWiki on how to set up the group footer
to print on the bottom of the page. Some would know about it of
course but I put the URL here for everybody else rather than post the
full code that is found there:

http://www.digital-metaphors.com:8080/Design/Groups/How_To...Align_Group_Footer_to_Bottom

However I wished to do the same thing using only RAP rather than through
Delphi. For the benefit of others trying to do the same I outline what I
have done.

1. Create a RAP pass-through for ppFromMMThousandths with a signature of:
function ppFromMMThousandths(Value: Integer; aUnits: TppUnitType;
aResolutionHorizontal: boolean;
aPrinter: TObject) : single;

I simply map the aResolutionHorizontal to the ppTypes.TppResolutionType
and call ppUtils.ppFromMMThousandths.

2. Create a RTTI class with declaration below:

TppCustomEngineRTTI = class(TraTppCacheableRTTI)
etc.

Ensure you include the units: ppTypes, ppUtils, ppCache, ppClass.


3. In the report create a RAP event handler for
GroupFooter.OnBeforePrint event and copy exactly as in the article
except to the ppFromMMThousanths, pass a true or false for the
resolution depending whether you want the horizontal resolution
conversion or not. Check the ppUtils in the source folder for the
ppFromMMThousandths function to understand this more fully.

I can post the code for the RAP pass-through and RTTI class as well as
the RAP code if someone wants it. It might not be a bad addition to the
wiki article.

Hope someone benefits from this post. It took me a bit to figure out
and I hope to save someone some time.

Report builder is a good product.

Kevin Day.

Comments

  • edited November 2009
    Actually I don't think there was a previous post. I somehow thought
    that I had accidentally posted this before I completed but I hadn't.

    Kevin Day.

This discussion has been closed.