Dali znae nekoj kako mozam TQRDBText da se pecati vertikalno
Najdov nekoj kod
function CreateRotatedFont(Font: TFont; Degrees: Integer): HFONT;
var
LF : TLogFont;
begin
FillChar(LF, SizeOf(LF), #0);
with LF do begin
lfHeight := Font.Height;
lfWidth := 0;
lfEscapement := Degrees*10;
lfOrientation := 0;
if fsBold in Font.Style then
lfWeight := FW_BOLD
else
lfWeight := FW_NORMAL;
lfItalic := Byte(fsItalic in Font.Style);
lfUnderline := Byte(fsUnderline in Font.Style);
lfStrikeOut := Byte(fsStrikeOut in Font.Style);
lfCharSet := DEFAULT_CHARSET;
StrPCopy(lfFaceName, Font.Name);
lfQuality := DEFAULT_QUALITY;
lfOutPrecision := OUT_DEFAULT_PRECIS;
lfClipPrecision := CLIP_DEFAULT_PRECIS;
case Font.Pitch of
fpVariable: lfPitchAndFamily := VARIABLE_PITCH;
fpFixed: lfPitchAndFamily := FIXED_PITCH;
else
lfPitchAndFamily := DEFAULT_PITCH;
end;
end;
Font.Size := 5; //---
Result := CreateFontIndirect(LF);
end;
(U will need to add "uses Windows, Graphics, SysUtils;")
2. IN THE ONPRINT EVENT OF A LABEL, PLACE THIS CALL TO THE UNIT:
TQRDBText(Sender).Font.Handle := CreateRotatedFont(TQRDBText
(Sender).Font,90); // 90 is the degree of rotation
OR
TQRLabel(Sender).Font.Handle := CreateRotatedFont(TQRDBText
(Sender).Font,90); // 90 is the degree of rotation
3. VERY IMPORTANT : PRINTMETAFILE PROPERTY OF REPORT
U can find this property in: TQuickReport.PrinterSettings.PrintMetaFile
This must be set to TRUE, otherwise only the preview will rotate the
label, not the printer.
Ova funkcionira za da ja izrotira sodrzinata samo na preview no ne i na print t.e. mene mi treba da snimam vo pdf
segment: od ovaa komponenta TQRAngledDBText nesto neraboti, koga sakas da dodades dataset i datafield javuva greska
a TQRAngledLabel raboti super
Onda postavi jedan običan QRDBText i stavi da je Visible := False, dodaj QRAngledLabel i stavi na BandBeforePrint WRAngledLabel.Caption := QRDBText.Text i to je to.
i jas napraviv nesto slicno na BandBeforePrint staviv WRAngledLabel.Caption :=table1pole.asstring;
cisto da znaat i drugite ako im pritreba deka toa ne im funkcionira bezprekorno ;)
Fala za tvoite sekogas iscrpni odgovori
segment: i jas napraviv nesto slicno na BandBeforePrint staviv WRAngledLabel.Caption :=table1pole.asstring;
cisto da znaat i drugite ako im pritreba deka toa ne im funkcionira bezprekorno
Fala za tvoite sekogas iscrpni odgovori
Ovo je čak i bolje rješenje od mojega! Bitno da radi