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

Detail band printing over my footer

edited January 2004 in General
I sure hope someone can help me because this has been driving me crazy for a
couple of months now.

I am going to do my best to explain this one so here goes. I am using a
dynamically loaded sub report for my footer. My footer is 0.3021 inches
high. My detail lines include a TppWPTRichText component (yes, I know it is
a third party component) and it's stretch property is set to true. My
detail band is set to PrintHeight=phDynamic. If the detail line is printing
near the bottom of my page and it includes some text or a picture in the
TppWPTRichText, instead of moving to the next page, it prints over my
footer.

It doesn't seem to be taking the height of the TppWPTRichText into account
when determining the full height of the detail band for this record and
whether the detail line should be moved to the next page.

I guess I could handle it manually if there is a way to get the bands height
with the TppWPTRichText included and get it's current position but I'm not
really sure how or where this should be done.

Thanks in advance,
Mark Greenhaw
One Domain, Inc.

Comments

  • edited January 2004
    Hi Mark,

    Try this...

    In the DetailBand.AfterPrint event get the value of
    Report.Engine.PrintPosRect.Top. This will be the location of the bottom of
    your dynamic detail band. Then using the top position and height of your
    RichText Component, you should be able to position it so it fits withing
    this boundary. Hope this helps.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2004
    Now I'm really confused. . Isn't this after the band has already
    printed? How can I keep the band together if the Rich Text won't fit on the
    current page. At this point isn't the first part of the band already
    printed. I even tried putting all of this in a TppRegion with the region
    set to stretch but that didn't seem to help either. Is the TppWPTRichText
    not printing as part of the band? Lots of questions I know. Sorry.

    I did an experiment. I put a MessageDialog in the ppDetailBand1.AfterPrint
    to show me the value of Report.Engine.PrintPosRect.Top for each record.
    Here are the values for the first page (which has the overprint problem)...

    72127, 80064, 88002, 95940, 103878, 111816, 119754, 127692, 157330,
    165268, 173206, 181144, 210782

    As indicated by these values, the height of the band is being adjusted by
    the height of the TppWPTRichText already (127692 is 29638 more than it's
    predecessor as is 210782. The others which have no values in their
    TppWPTRichText are only 7938 more than their predecessors.

    Although this seems to indicate the engine knows of the correct size, it
    doesn't seem to realize this will print over the footer and even print past
    the margins.

    Hope this extra info sheds some light.

    Thanks for your help,
    Mark Greenhaw
    One Domain, Inc.


  • edited January 2004
    Hi Mark,

    I'm unsure how the TppWPTRichText component works, but I assume that it is a
    descendent of TppCustomRichText. Regardless, I noticed you mentioned that
    there are images inside your RichText component. ReportBuilder can not
    calculate the height of an image in the RichText component, it is only
    capable of finding the height of text. This is probably the reason it
    prints below the footer band. You will need to somehow find the height of
    the image before hand and set the TppRichText component to that height
    manually.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2004
    As referenced in my previous post, ReportBuilder SEEMS to be calculating the
    height just fine, there is no text in the example, just an image. Maybe
    it's just not getting the correct height until after it has already printed
    and then it's already printed over the footer or past the bottom margin.

    If you would prefer we continue this via email to speed up resolution, I can
    be reached at xmark@onedomain.comx (remove the preceding and trailing x's).

    Sincerely,
    Mark Greenhaw
    One Domain, Inc.

    --


    ----------------------------------------------------
    This mailbox protected from junk email by Matador
    from MailFrontier, Inc. http://info.mailfrontier.com

This discussion has been closed.