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

Font size changing in DBMemos

edited July 2001 in General
I discovered a odd behaviour (of which I don't know if bug or feature). I
create a report mostly by code, meaning I create all the fields and titles
myself via code. It happens now, that if a memo has more text then the
initial size (they are set to Stretch), that the font size changes from 10
to something smaller. Strangely enough, this does not happen with every row.
So, in one row you have three lines of text in the memo field in size ten,
the next one might have two lines in size 8. What's going on? Why does the
font size change?

Here is the piece of code that creates the detail fields of the report.

with TppDBMemo(ppComponentCreate(Report, TppDBMemo)) do begin
Transparent := true;
spTop := 1;
with Font do begin
Color := clBlack;
Name := 'Arial';
Size := 10;
Style := [];
end;
Stretch := true;
if l <> 0 then
spLeft := Trunc(l * ColumnWidth + LeftOffset) + ColumnGap
else
spLeft := Trunc(l * ColumnWidth + LeftOffset);
spWidth := Trunc(ColumnWidth) - ColumnGap;
Band := Report.DetailBand;
BottomOffset := 1;
Region := TppComponent(Report.FindUserObject('DetailRegion'));
KeepTogether := true;
OverFlowOffset := 1;
DataField := XMLData.ColumnNames[l];
DataPipeline := XMLDBPipe;
end;

I still use RB 5.56, by the way.

-------------------------------------------------------------------
Marco Heine
QUMAS
Enterprise Compliance Management
Visit our Website: www.qumas.com

Comments

  • edited July 2001
    By any chance are you referring to the previewer? It is quite
    common for some unusual changes to occur since the output
    is being created to look as close as possible to the actual
    printed report. However, this is not actually possible...
    hence some anomalies.

    There is a thread somewhere in the archive that
    explains the issue of optimizing for screen vs printer.

    Jon


  • edited July 2001
    I made the assumption that viewing a report at 100% in ppViewer is WYSIWYG,
    but printing the report in question, I have to say you are right. It prints
    perfectly.

    Thanks...
    -------------------------------------------------------------------
    Marco Heine
    QUMAS
    Enterprise Compliance Management
    Visit our Website: www.qumas.com




This discussion has been closed.