Einzelnen Beitrag anzeigen

SearchBot

Registriert seit: 27. Jun 2004
Ort: N-W vom Bodensee
313 Beiträge
 
Delphi 12 Athens
 
#1

FastReport 5 VCL: nur 1 Blatt drucken?

  Alt 17. Feb 2017, 18:35
Hallo,

mein erstes Projekt, in dem ich ein Etikett (nur ein einziges) drucken möchte. Aber Fastreport generiert das Etikett ohne Ende in der Vorschau - bis ich es merke, ist der Zähler schon bei 2500 Seiten...

Leider ist die Downloadversion von cc.embarcadero... im registered-user-Bereich ohne Samples und ohne Dokumentation und ich google mir schon die Hand ab.

Wie kann ich denn einstellen, daß ich bitte nur 1 Seite bzw Stück von meinem Etikett möchte?

Ich habe bisher folgendes gemacht:

Komponenten aufs Form1:
Delphi-Quellcode:
object frxUserDataSet1: TfrxUserDataSet
  UserName = 'frxUserDataSet1'
  Fields.Strings = (
    'chk_sheet'
    'chk_MVE'
    'RMAnr'
    'Kunde'
    'Datum'
    'Typen'
    'Menge'
    'Kisten'
    'PrioFlag')
  OnGetValue = frxUserDataSet1GetValue
  Left = 128
  Top = 16
end
Ich nutze dazu übrigens keine Bänder, sondern habe die grafischen Elemente direkt auf die Seite gelegt:

Delphi-Quellcode:
object frLabel: TfrxReport
  Version = '5.3.14'
  DataSet = frxUserDataSet1
  DataSetName = 'frxUserDataSet1'
  DotMatrixReport = False
  IniFile = '\Software\Fast Reports'
  PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick]
  PreviewOptions.Zoom = 1.000000000000000000
  PrintOptions.Collate = False
  PrintOptions.Printer = 'Default'
  PrintOptions.PrintOnSheet = 257
  ReportOptions.CreateDate = 42783.567637453700000000
  ReportOptions.LastChange = 42783.656428784700000000
  ScriptLanguage = 'PascalScript'
  ScriptText.Strings = (
    'begin'
    ''
    'end.')
  Left = 328
  Top = 16
  Datasets = <
    item
      DataSet = frxUserDataSet1
      DataSetName = 'frxUserDataSet1'
    end>
  Variables = <>
  Style = <>
  object Data: TfrxDataPage
    Height = 1000.000000000000000000
    Width = 1000.000000000000000000
  end
  object Page1: TfrxReportPage
    PaperWidth = 99.000000000000000000
    PaperHeight = 47.000000000000000000
    PaperSize = 257
    object Shape1: TfrxShapeView
      Left = -3.779530000000000000
      Top = 128.504020000000000000
      Width = 226.771800000000000000
      Height = 56.692950000000000000
    end
    object BarCode1: TfrxBarCodeView
      Left = 26.456710000000000000
      Top = -7.559060000000000000
      Width = 324.800000000000000000
      Height = 82.527520000000000000
      BarType = bcCode39Extended
      DataField = 'RMAnr'
      DataSet = frxUserDataSet1
      DataSetName = 'frxUserDataSet1'
      Frame.Width = 3.000000000000000000
      Rotation = 0
      Text = '2868040'
      WideBarRatio = 1.000000000000000000
      Zoom = 2.800000000000000000
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -12
      Font.Name = 'Arial'
      Font.Style = []
    end
    object Memo1: TfrxMemoView
      Left = 15.118120000000000000
      Top = 26.834645669291300000
      Width = 98.267780000000000000
      Height = 52.913420000000000000
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -35
      Font.Name = 'Arial Black'
      Font.Style = [fsBold]
      Memo.UTF8W = (
        'RMA')
      ParentFont = False
    end
    object Memo2: TfrxMemoView
      Left = 3.779530000000000000
      Top = 83.149660000000000000
      Width = 68.031540000000000000
      Height = 41.574830000000000000
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -16
      Font.Name = 'Arial'
      Font.Style = [fsItalic]
      HAlign = haRight
      LineSpacing = 7.000000000000000000
      Memo.UTF8W = (
        'client:'
        'content:')
      ParentFont = False
    end
    object chkSheet: TfrxCheckBoxView
      Left = 275.905690000000000000
      Top = 37.795300000000000000
      Width = 18.897650000000000000
      Height = 18.897650000000000000
      CheckColor = clBlack
      CheckStyle = csCheck
      DataField = 'chk_sheet'
      DataSet = frxUserDataSet1
      DataSetName = 'frxUserDataSet1'
      Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
    end
    object Memo3: TfrxMemoView
      Left = 298.582870000000000000
      Top = 37.795300000000000000
      Width = 64.252010000000000000
      Height = 18.897650000000000000
      Memo.UTF8W = (
        'use sheet')
    end
    object Memo4: TfrxMemoView
      Left = 113.385900000000000000
      Top = 132.283550000000000000
      Width = 45.354360000000000000
      Height = 18.897650000000000000
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Arial'
      Font.Style = [fsItalic, fsUnderline]
      Memo.UTF8W = (
        'total')
      ParentFont = False
    end
    object Memo5: TfrxMemoView
      Left = 158.740260000000000000
      Top = 132.283550000000000000
      Width = 59.685863870000000000
      Height = 18.897650000000000000
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Arial'
      Font.Style = [fsItalic, fsUnderline]
      Memo.UTF8W = (
        'container')
      ParentFont = False
    end
    object Memo6: TfrxMemoView
      Left = 15.118120000000000000
      Top = 132.283550000000000000
      Width = 86.929190000000000000
      Height = 18.897650000000000000
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Arial'
      Font.Style = [fsItalic, fsUnderline]
      Memo.UTF8W = (
        'recorded')
      ParentFont = False
    end
    object txDatum: TfrxMemoView
      Left = 15.118120000000000000
      Top = 151.181200000000000000
      Width = 86.929190000000000000
      Height = 22.677180000000000000
      DataField = 'Datum'
      DataSet = frxUserDataSet1
      DataSetName = 'frxUserDataSet1'
      DisplayFormat.FormatStr = 'dd.mm.yy'
      DisplayFormat.Kind = fkDateTime
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -20
      Font.Name = 'Arial'
      Font.Style = [fsBold]
      Memo.UTF8W = (
        '[frxUserDataSet1."Datum"]')
      ParentFont = False
    end
    object txMenge: TfrxMemoView
      Left = 113.385900000000000000
      Top = 151.181200000000000000
      Width = 35.863874350000000000
      Height = 22.677180000000000000
      DataField = 'Menge'
      DataSet = frxUserDataSet1
      DataSetName = 'frxUserDataSet1'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -20
      Font.Name = 'Arial'
      Font.Style = [fsBold]
      Memo.UTF8W = (
        '[frxUserDataSet1."Menge"]')
      ParentFont = False
    end
    object txKisten: TfrxMemoView
      Left = 188.976500000000000000
      Top = 151.181200000000000000
      Width = 15.118120000000000000
      Height = 22.677180000000000000
      DataField = 'Kisten'
      DataSet = frxUserDataSet1
      DataSetName = 'frxUserDataSet1'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -20
      Font.Name = 'Arial'
      Font.Style = [fsBold]
      Memo.UTF8W = (
        '[frxUserDataSet1."Kisten"]')
      ParentFont = False
    end
    object chkMVE: TfrxCheckBoxView
      Left = 275.905690000000000000
      Top = 60.472480000000000000
      Width = 18.897650000000000000
      Height = 18.897650000000000000
      CheckColor = clBlack
      CheckStyle = csCheck
      DataField = 'chk_MVE'
      DataSet = frxUserDataSet1
      DataSetName = 'frxUserDataSet1'
      Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
    end
    object Memo7: TfrxMemoView
      Left = 298.582870000000000000
      Top = 60.472480000000000000
      Width = 64.252010000000000000
      Height = 18.897650000000000000
      Memo.UTF8W = (
        'MVE Rep')
    end
    object txPrio: TfrxMemoView
      Left = 226.771800000000000000
      Top = 128.504020000000000000
      Width = 139.053442250000000000
      Height = 45.354360000000000000
      DataField = 'PrioFlag'
      DataSet = frxUserDataSet1
      DataSetName = 'frxUserDataSet1'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -33
      Font.Name = 'Arial Black'
      Font.Style = [fsBold]
      Memo.UTF8W = (
        '[frxUserDataSet1."PrioFlag"]')
      ParentFont = False
    end
    object txKunde: TfrxMemoView
      Left = 75.590600000000000000
      Top = 83.149660000000000000
      Width = 291.023810000000000000
      Height = 18.897650000000000000
      DataField = 'Kunde'
      DataSet = frxUserDataSet1
      DataSetName = 'frxUserDataSet1'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -16
      Font.Name = 'Arial'
      Font.Style = []
      Memo.UTF8W = (
        '[frxUserDataSet1."Kunde"]')
      ParentFont = False
    end
    object txTypes: TfrxMemoView
      Left = 75.590600000000000000
      Top = 105.826840000000000000
      Width = 291.023810000000000000
      Height = 18.897650000000000000
      DataField = 'Typen'
      DataSet = frxUserDataSet1
      DataSetName = 'frxUserDataSet1'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -16
      Font.Name = 'Arial'
      Font.Style = [fsBold]
      Memo.UTF8W = (
        '[frxUserDataSet1."Typen"]')
      ParentFont = False
    end
  end
end
und Code in Form1:
Delphi-Quellcode:
procedure TForm1.btn_RMALabelClick(Sender: TObject);
begin
  frLabel.ShowReport;
end;

procedure TForm1.frxUserDataSet1GetValue(const VarName: string;
  var Value: Variant);
begin
 if VarName='chk_sheetthen Value:=false; //checkbox1.checked
 if VarName='chk_MVEthen Value:=true;
 if VarName='RMAnrthen Value:=le_QRrepAB.text;
 if VarName='Kundethen Value:=cb_repKunde.text;
 if VarName='Datumthen Value:=dt_repDatum.Date;
 if VarName='Typenthen Value:='A B C';
 if VarName='Mengethen Value:='12';
 if VarName='Kistenthen Value:='5';
 if VarName='PrioFlagthen Value:=false;
end;
Das Vorschaufenster geht auf und generiert ohne Ende Seiten mit dem gleichen Inhalt. Ich brauch aber nur 1 Seite.
Was fehlt?
  Mit Zitat antworten Zitat