Text too high on grey background
I'm trying to get text to print within a grey box.
With both a TppDBText and a TppLabel, when I set the Color property to
clSilver and the Transparent property to False, the result looks fine at
design time, and in the print preview, but on paper the text is too high
compared to the grey background rectangle (or the rectangle is too low).
The tops of the letters appear to be a pixel or two higher than the top of
the grey rectangle.
Developed using:-
ReportBuilder Standard Edition, Version 7.03
Delphi 5 Pro
NT4 SP5
HP LaserJet 4 Plus
Also tested on:-
Windows 98
HP LaserJet 5
--Bill Sparrow--
With both a TppDBText and a TppLabel, when I set the Color property to
clSilver and the Transparent property to False, the result looks fine at
design time, and in the print preview, but on paper the text is too high
compared to the grey background rectangle (or the rectangle is too low).
The tops of the letters appear to be a pixel or two higher than the top of
the grey rectangle.
Developed using:-
ReportBuilder Standard Edition, Version 7.03
Delphi 5 Pro
NT4 SP5
HP LaserJet 4 Plus
Also tested on:-
Windows 98
HP LaserJet 5
--Bill Sparrow--
This discussion has been closed.
Comments
-----------------------------------------------------
Article: Why Preview may not Match Printed Output
-----------------------------------------------------
ReportBuilder uses the Printer device context to perform all calculations
required to generate the report pages. This includes measuring text,
wrapping text, and calculating the vertical page space required by a
stretchable component such as a memo.
Using the Printer device context results in a very high degree of accuracy
when printing to the printer. For report Preview, all page elements must be
scaled back to the screen. A typical printer has a resolution of 600 pixels
per inch (or more). A typical screen has 96 pixels per inch. Thus there is
some loss of fidelity in rendering to the screen.
For multi-line text such as memos, ReportBuilder sometimes shrinks the font
size for the preview so that the rendered text can fit within the required
vertical page space. Even when True Type fonts this is sometimes necessary.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Where my problem is concerned the on-screen layout is fine.
Is is the printed result on paper that is wrong.
I can see how your answer would apply if I had "designed something to look
right on screen" by tweaking some variable, only to find that a different
value for that variable would make it look right on paper.
However, there is no variable here that I *can* tweak as far as I can see.
I just plonked a TppLabel on the report, I set the Color property to
clSilver and the Transparent property to False, the result looks fine on
screen but on paper the text peeps over the top of the rectangle by a
pixel or two.
In article <402a3fb8$1@dm500.>, support@digital-metaphors.com (Nico Cizik
This is not a known issue with ReportBuilder. The best way to tell if your
report component is printing in the correct position is to look at the Top
and Left measurements of the object after you place them on the report, then
compare them (using a ruler) when you print it out on paper. In my
experience, most printers are fairly accurate, especially HP's, so the
measurements should be very close to the values given at design. The
on-screen display however may not reflect these values. If you are placing
a TppLabel near the top of a rectangle on screen and it is printing a
couple pixels above the top, you may need to move the label down a bit to
get to output on paper that you desire.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I'm not placing a TppLabel in a rectangle. I'm setting the Color property
of the TppLabel itself to clSilver, and the Transparent property of the
TppLabel itself to False. This causes the TppLabel to draw its own
background as a grey rectangle. But when the component prints, the text
is just outside the rectangle. The one single component is responsible
for both the text and the rectangle, so why is one displaced compared to
the other?
In article <402ba28a$1@dm500.>, support@digital-metaphors.com (Nico Cizik
Ok, I finally understand the problem now . However, in testing with a
configuration similar to yours, I was unable to recreate the behavior. I am
using ReportBuilder 7.03 Standard for Delphi 5 on a Windows 2000 machine and
printing to a HP LaserJet 5. I created a new report with a single TppLabel
in the header band with the highlight color set to clSilver and transparency
set to False. This seemed to work correctly on screen and on paper. Please
let me know if I need to do something else to recreate this behavior.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I just repeated those steps here and it failed.
My guess is that we will just have to put this down to my pre-historic
systems I am running here! 8-)
I'll check later to see what happens when I run the app on my customer's
machine.
Cheers,
Bill
In article <402ce13c$1@dm500.>, support@digital-metaphors.com (Nico Cizik