The edge of the character gets cut off - How can I stop it?
I am using Report Builder 7.01 with Delphi 7 on Windows XP Pro machine using
a HP Laserjet 2300d with the latest drivers to date from the website.
On screen all looks fine. My report is using Arial 8, but any TppDBText
objects that are set to AutoSize := True and any Text Alignment seem to cut
off a sliver of the letter at the end of it. I see it most commonly on
dates, parentheses, capital letters, etc.
I realize it may be the printer, but what can I do to stop this as it makes
the report not as professional looking.
Can I assign somewhere to make the right margin of the autosize to be a
certain length past the autosize value?
Regards,
Douglas
a HP Laserjet 2300d with the latest drivers to date from the website.
On screen all looks fine. My report is using Arial 8, but any TppDBText
objects that are set to AutoSize := True and any Text Alignment seem to cut
off a sliver of the letter at the end of it. I see it most commonly on
dates, parentheses, capital letters, etc.
I realize it may be the printer, but what can I do to stop this as it makes
the report not as professional looking.
Can I assign somewhere to make the right margin of the autosize to be a
certain length past the autosize value?
Regards,
Douglas
This discussion has been closed.
Comments
Rather than changing the ReportBuilder source, try using the
Report.Printer.Canvas to find the text width and then manually set the
DBText width, adding a few pixels, according to the calculated text width.
Something like the following...
TForm1.DetailBand1BeforePrint(Sender: TObject);
var
lCanvas: TCanvas;
lsDBField: String;
liTextWidth: Integer
begin
lCanvas := TCanvas.Create(nil);
try
lCanvas := ppReport.Printer.Canvas;
lCanvas.Font := ppDBText.Font;
lsDBField := ppReport.DataPipeline['myDBField'];
liTextWidth := lCanvas.TextWidth(lsDBField);
ppDBText.Width := liTextWidth + 10;
finally
lCanvas.Free;
end;
end
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
this might solve any problems.
I found that when I print 1 report only once, then it prints all the
characters completely. If I change the copies to be more than 1 then it
cuts characters. Is this a Report Builder bug or a printer driver bug?
Most things I do I print multiple copies and this is why I never noticed the
pattern before, but I just found this pattern and it is very interesting.
Douglas