Home
Top.Mail.Ru Yandeks.Metrika
Forum: "Bases";
Current archive: 2002.04.01;
Download: [xml.tar.bz2];

Down

Quick report Find similar branches


narik   (2002-03-10 17:13) [0]

Hi all!
There was a question!
I create a report in the form of a table using Quick Report.
Data for the report I take from ADOQuery. I display the fields using the QRDBText component. I use the event of this OnPrint component to check the length of the displayed word, and if it is longer than the width of the column, I try to "fit" it in the width of the column by changing the value of the lfWidth field of the TLogFont structure.
In the end, I have something like this:

If> then
begin
{Keep original font}
SaveFont.Assign (QRDBText.Font);

FillChar (FLogFont, sizeof (TLogFont), 0);
with FLogFont do
begin
......................
lfWidth: =?;
......................
end;

QRDBText.Font.Handle: = CreateFontIndirect (FLogFont);

{Restore original font}
QRDBText.Font.Assign (SaveFont);
end
else
...;

On the preview, everything is fine, but when printing,
the original font is printed, i.e. long words crawl out of the column. :-(

Along the way, another question. Maybe the problem is the same kind.
Vertical lines "draw" with QRShape. I’m doing Pen.Width: = 3, in the preview it’s OK again, and the printer prints all the same thin lines.

OS - WinMe, D6, Printer - OKIPAGE 8wLite.



Delirium   (2002-03-10 17:30) [1]

IHMO: In OnPrint, only the Value is correctly changed



narik   (2002-03-10 17:45) [2]

I tried to create the font in the OnCreate form, then did QuickRep.Font.Handle: = CreateFontIndirect (FLogFont);
(to try what happens on the printer)
and all one.

Why then on the preview everything is fine?



Pages: 1 whole branch

Forum: "Bases";
Current archive: 2002.04.01;
Download: [xml.tar.bz2];

Top









Memory: 0.55 MB
Time: 0.025 c
We answer immediately.
Ajax
2002-02-18 23:11
2002.04.01
astalaViSta money saver


We answer immediately.
Zool
2002-03-21 22:53
2002.04.01
Error


We answer immediately.
Yulik
2002-03-06 11:33
2002.04.01
Dbgrid


We answer immediately.
Nikolay
2002-01-02 22:25
2002.04.01
Регистр


We answer immediately.
qqshka
2002-03-21 12:36
2002.04.01
Command line arguments





afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic indonesian Irish italian japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Español swahili Swedish thai turkish Ukrainian urdu vietnamese welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
zulu
English French German Italian Portuguese Russian Spanish