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

Eliminating blank address lines

edited January 2002 in General
I have a secondary address field (Address2) that is usually blank but may
contain data. I want the line on which the field appears to be eliminated if
it's blank, so City / Province appear directly below Address1 rather than
there being a blank line between them.

I tried making a ppMemo that's the height of one line of text, setting its
Stretch = True and the parent band's PrintHeight to phDynamic, and
ShiftWithParent for all the components below it to True. In the ppMemo's
OnPrint event I clear it and add the contents of Address1 and, if it's not
blank, Address2 to its Lines.

This works fine when I display the report on the screen. The ppMemo shows 1
or 2 lines and the other components shift as necessary. But when I send the
same report to the printer, I get a single line of garbage in the ppMemo.

Any idea what I'm doing wrong??

--
Stephen Aberle {{8^{ )}
Programmer, Unipharm Wholesale Drugs Ltd.
mailto:stephen_a@unipharm.com

Comments

  • edited January 2002
    The report events are getting refired when you send the report to the
    printer. Place a breakpoint where the memo text is assigned, and check the
    contents of the Memo.Lines.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited January 2002

  • edited January 2002
    Hm, curiouser and curiouser. I also have this problem with a plain and
    simple ppMemo (I made one to test) whose contents are set at design time and
    not changed. The memo text looks fine in print preview, and everything else
    prints fine, but the contents of the memo as printed on paper are garbage.

    - Stephen Aberle

This discussion has been closed.