Eliminating blank address lines
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
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
This discussion has been closed.
Comments
printer. Place a breakpoint where the memo text is assigned, and check the
contents of the Memo.Lines.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
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