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.56 MB
Time: 0.017 c
6-257
Fred
2002-01-19 03:04
2002.04.01
How to get confirmation of the delivery of the letter?


3-3
andyfirst
2002-03-05 14:44
2002.04.01
Request Error


1-145
ZL
2002-03-22 07:36
2002.04.01
There is a ListBox in the 300 records, every half a second I print in the label a record starting with the first one and ending with the last one. How do I do ProgresBar for this action?


3-27
staratel
2002-03-05 08:52
2002.04.01
Databases (DBGrid)


14-317
Vudz
2002-02-17 14:43
2002.04.01
How do you like this:





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