sub Init_Components
with AutoForm
 .Left = 1
 .Top = 1
 .Width = 798
 .Height = 570
 .BorderIcons = "biSystemMenu, biMaximize"
 .Caption = " "
 .Color = "clBtnFace"
 .Font.Charset = 204
 .Font.Color = "clWindowText"
 .Font.Height = -11
 .Font.Name = "MS Sans Serif"
 .Font.Style = ""
 .OldCreateOrder = False
 .Scaled = False
 .PixelsPerInch = 96
 AutoForm.add "QR", "TQuickRep"
 with QR
  .Left = -8
  .Top = 0
  .Width = 794
  .Height = 1123
  .Frame.Color = "clBlack"
  .Frame.DrawTop = False
  .Frame.DrawBottom = False
  .Frame.DrawLeft = False
  .Frame.DrawRight = False
  .Font.Charset = 204
  .Font.Color = "clWindowText"
  .Font.Height = -13
  .Font.Name = "Arial"
  .Font.Style = ""
  .Options = "FirstPageHeader, LastPageFooter"
  .Page.Columns = 1
  .Page.Orientation = "poPortrait"
  .Page.PaperSize = "A4"
  .PrinterSettings.Copies = 1
  .PrinterSettings.Duplex = False
  .PrinterSettings.FirstPage = 0
  .PrinterSettings.LastPage = 0
  .PrinterSettings.OutputBin = "Auto"
  .PrintIfEmpty = True
  .SnapToGrid = True
  .Units = "MM"
  .Zoom = 100
  QR.add "DetailBand1", "TQRBand"
 with DetailBand1
   .Left = 76
   .Top = 38
   .Width = 681
   .Height = 775
   .Frame.Color = "clBlack"
   .Frame.DrawTop = False
   .Frame.DrawBottom = False
   .Frame.DrawLeft = False
   .Frame.DrawRight = False
   .AlignToBottom = False
   .Color = "clWindow"
   .ForceNewColumn = False
   .ForceNewPage = False
   .BandType = "rbDetail"
   DetailBand1.add "QRLabel2", "TQRLabel"
 with QRLabel2
    .Left = 16
    .Top = 18
    .Width = 103
    .Height = 19
    .Frame.Color = "clBlack"
    .Frame.DrawTop = False
    .Frame.DrawBottom = False
    .Frame.DrawLeft = False
    .Frame.DrawRight = False
    .Alignment = "taLeftJustify"
    .AlignToBand = False
    .AutoSize = True
    .AutoStretch = False
    .Caption = ""
    .Color = "clWhite"
    .Font.Charset = 204
    .Font.Color = "clWindowText"
    .Font.Height = -15
    .Font.Name = "Arial"
    .Font.Style = "fsBold, fsUnderline"
    .ParentFont = False
    .Transparent = False
    .WordWrap = True
    end with
   DetailBand1.add "QRLabel6", "TQRLabel"
 with QRLabel6
    .Left = 31
    .Top = 44
    .Width = 21
    .Height = 17
    .Frame.Color = "clBlack"
    .Frame.DrawTop = False
    .Frame.DrawBottom = False
    .Frame.DrawLeft = False
    .Frame.DrawRight = False
    .Alignment = "taLeftJustify"
    .AlignToBand = False
    .AutoSize = True
    .AutoStretch = False
    .Caption = ": "
    .Color = "clWhite"
    .Font.Charset = 204
    .Font.Color = "clWindowText"
    .Font.Height = -12
    .Font.Name = "Arial"
    .Font.Style = ""
    .ParentFont = False
    .Transparent = False
    .WordWrap = True
    end with
   DetailBand1.add "QRLabel1", "TQRLabel"
 with QRLabel1
    .Left = 31
    .Top = 62
    .Width = 32
    .Height = 16
    .Frame.Color = "clBlack"
    .Frame.DrawTop = False
    .Frame.DrawBottom = False
    .Frame.DrawLeft = False
    .Frame.DrawRight = False
    .Alignment = "taLeftJustify"
    .AlignToBand = False
    .AutoSize = True
    .AutoStretch = False
    .Caption = ":"
    .Color = "clWhite"
    .Font.Charset = 204
    .Font.Color = "clWindowText"
    .Font.Height = -12
    .Font.Name = "Arial"
    .Font.Style = ""
    .ParentFont = False
    .Transparent = False
    .WordWrap = True
    end with
   DetailBand1.add "QRLabel3", "TQRLabel"
 with QRLabel3
    .Left = 31
    .Top = 80
    .Width = 54
    .Height = 16
    .Frame.Color = "clBlack"
    .Frame.DrawTop = False
    .Frame.DrawBottom = False
    .Frame.DrawLeft = False
    .Frame.DrawRight = False
    .Alignment = "taLeftJustify"
    .AlignToBand = False
    .AutoSize = True
    .AutoStretch = False
    .Caption = ":"
    .Color = "clWhite"
    .Font.Charset = 204
    .Font.Color = "clWindowText"
    .Font.Height = -12
    .Font.Name = "Arial"
    .Font.Style = ""
    .ParentFont = False
    .Transparent = False
    .WordWrap = True
    end with
   DetailBand1.add "QRLabel4", "TQRLabel"
 with QRLabel4
    .Left = 31
    .Top = 97
    .Width = 34
    .Height = 16
    .Frame.Color = "clBlack"
    .Frame.DrawTop = False
    .Frame.DrawBottom = False
    .Frame.DrawLeft = False
    .Frame.DrawRight = False
    .Alignment = "taLeftJustify"
    .AlignToBand = False
    .AutoSize = True
    .AutoStretch = False
    .Caption = ":"
    .Color = "clWhite"
    .Font.Charset = 204
    .Font.Color = "clWindowText"
    .Font.Height = -12
    .Font.Name = "Arial"
    .Font.Style = ""
    .ParentFont = False
    .Transparent = False
    .WordWrap = True
    end with
   DetailBand1.add "OT", "TQRLabel"
 with OT
    .Left = 151
    .Top = 45
    .Width = 21
    .Height = 17
    .Frame.Color = "clBlack"
    .Frame.DrawTop = False
    .Frame.DrawBottom = False
    .Frame.DrawLeft = False
    .Frame.DrawRight = False
    .Alignment = "taLeftJustify"
    .AlignToBand = False
    .AutoSize = True
    .AutoStretch = False
    .Caption = ": "
    .Color = "clWhite"
    .Font.Charset = 204
    .Font.Color = "clWindowText"
    .Font.Height = -12
    .Font.Name = "Arial"
    .Font.Style = ""
    .ParentFont = False
    .Transparent = False
    .WordWrap = True
    end with
   DetailBand1.add "KOMU", "TQRLabel"
 with KOMU
    .Left = 151
    .Top = 63
    .Width = 21
    .Height = 16
    .Frame.Color = "clBlack"
    .Frame.DrawTop = False
    .Frame.DrawBottom = False
    .Frame.DrawLeft = False
    .Frame.DrawRight = False
    .Alignment = "taLeftJustify"
    .AlignToBand = False
    .AutoSize = True
    .AutoStretch = False
    .Caption = ": "
    .Color = "clWhite"
    .Font.Charset = 204
    .Font.Color = "clWindowText"
    .Font.Height = -12
    .Font.Name = "Arial"
    .Font.Style = ""
    .ParentFont = False
    .Transparent = False
    .WordWrap = True
    end with
   DetailBand1.add "OTPRAV", "TQRLabel"
 with OTPRAV
    .Left = 151
    .Top = 80
    .Width = 21
    .Height = 16
    .Frame.Color = "clBlack"
    .Frame.DrawTop = False
    .Frame.DrawBottom = False
    .Frame.DrawLeft = False
    .Frame.DrawRight = False
    .Alignment = "taLeftJustify"
    .AlignToBand = False
    .AutoSize = True
    .AutoStretch = False
    .Caption = ": "
    .Color = "clWhite"
    .Font.Charset = 204
    .Font.Color = "clWindowText"
    .Font.Height = -12
    .Font.Name = "Arial"
    .Font.Style = ""
    .ParentFont = False
    .Transparent = False
    .WordWrap = True
    end with
   DetailBand1.add "TEMA", "TQRLabel"
 with TEMA
    .Left = 151
    .Top = 97
    .Width = 21
    .Height = 16
    .Frame.Color = "clBlack"
    .Frame.DrawTop = False
    .Frame.DrawBottom = False
    .Frame.DrawLeft = False
    .Frame.DrawRight = False
    .Alignment = "taLeftJustify"
    .AlignToBand = False
    .AutoSize = True
    .AutoStretch = False
    .Caption = ": "
    .Color = "clWhite"
    .Font.Charset = 204
    .Font.Color = "clWindowText"
    .Font.Height = -12
    .Font.Name = "Arial"
    .Font.Style = ""
    .ParentFont = False
    .Transparent = False
    .WordWrap = True
    end with
   DetailBand1.add "TELO", "TQRLabel"
 with TELO
    .Left = 31
    .Top = 117
    .Width = 642
    .Height = 652
    .Frame.Color = "clBlack"
    .Frame.DrawTop = False
    .Frame.DrawBottom = False
    .Frame.DrawLeft = False
    .Frame.DrawRight = False
    .Alignment = "taLeftJustify"
    .AlignToBand = False
    .AutoSize = False
    .AutoStretch = False
    .Color = "clWhite"
    .Font.Charset = 204
    .Font.Color = "clWindowText"
    .Font.Height = -12
    .Font.Name = "Arial"
    .Font.Style = ""
    .ParentFont = False
    .Transparent = False
    .WordWrap = True
    end with
   end with
  end with
 end with
end sub


function ON_PREVIEW (inBlb)
set qPlat=self.Controls("qMessage")
call Init_Components
KOMU.Caption=qplat.FieldByNameString("NAMETO")
OT.Caption=qplat.FieldByNameString("NAMEFROM")
TEMA.Caption=qplat.FieldByNameString("SUBJECT")
TELO.Caption=qplat.FieldByNameString("BODY")

QR.previewmodal
on_preview="1"
end function
