Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

ShiftWithParent & ReprintOnOverflow

edited April 2005 in General
Hi,

I have a subreport where the detail band contains the following component
types (in this order):
TppVariable,
TppDBText,
TppVariable,
TppDBMemo (Stretch = true),
TppVariable,
TppVariable

When I set all variables and the DBText component to ReprintOnOverflow, when
the report comes to a page break, the first 4 components behave as expected
if the memo stretches, but the last 2 variables print on both the previous
page and the next page. Is there a way I can fix this?

Thank you.

Comments

  • edited April 2005
    Hi Gary,

    Try placing the two bottom variables inside a TppRegion and set the region
    to ShiftRelativeTo the stretching memo. This should give you the effect you
    are after.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2005
    Thank you for the quick response. The TppRegion seems to solve my problem
    with regard to the variables shifting properly with the memo field. I'm now
    trying to set the ShiftWithParent flag on one of the TppVariables at
    runtime. What I would like to do is set this flag to true if a certain
    condition is met. If I set it to true at design time, the variable will
    appear even with the last line of the memo field, which is what I want to
    achieve only when this condition is met. I've tried putting code into the
    following TppVariable events:

    OnCalc
    OnPrint
    OnDrawCommandCreate
    OnFormat

    None of this has worked. The variable I'm dealing with resides inside a
    region which also contains the memo field. Here's the code I'm writing for
    the events mentioned.

    var
    x:Integer;
    begin
    x := roaDetailPipeline.GetFieldValue('TRANSTYPE');
    if (x > 0) and (x < 3) then
    ppVariable17.ShiftWithParent := true
    else
    ppVariable17.ShiftWithParent := false;
    end;



This discussion has been closed.