Einzelnen Beitrag anzeigen

Benutzerbild von Union
Union
Online

Registriert seit: 18. Mär 2004
Ort: Luxembourg
3.492 Beiträge
 
Delphi 7 Enterprise
 
#6

Re: Fastreport 4 Beispiel für eine Rechnung das Prinzip n. v

  Alt 18. Jun 2008, 10:49
Ich hab das jetzt mal mit TFrxDataSet Komponenten im Designer probiert. Der Trick ist, dass man nicht nur die TFrxParams setzen muß, sondern auch das Feld Master auf die Kopfdatenmenge:
Code:
Rgkopf : TFrx...DataSet
SQL: Select * from Rgkopf

Rgpos : Tfrx...DataSet
SQL: Select * from RgPos where rgkopf_id = :id
Params.Name : id
Params.Datatype: ftFloat
Params.Value: <RgKopf."ID">
Master: RGKopf
Läßt man das Setzen des Master weg, so gibt es tatsächlich ziemliches Durcheinander. Der dazugehörige (scheußliches Design) Testreport:
XML-Code:
<?xml version="1.0" encoding="utf-8"?>
<TfrxReport Version="4.5" DotMatrixReport="False" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Default" PrintOptions.PrintOnSheet="0" ReportOptions.Compressed="True" ReportOptions.CreateDate="39490,6341565972" ReportOptions.Description.Text="" ReportOptions.LastChange="39617,448543287" ScriptLanguage="PascalScript" ScriptText.Text="begin

end." StoreInDFM="False" PropData="044C656674021003546F70020808446174617365747301010C2600000020446174615365743D2252674B6F70662220446174615365744E616D653D2252674B6F70662200010C2400000020446174615365743D225267504F732220446174615365744E616D653D225267506F73220000095661726961626C65730100055374796C650100">
  <TfrxDataPage Name="Data" Height="1000" Left="0" Top="0" Width="1000">
    <TfrxADSQuery Name="RgKopf" UserName="RgKopf" CloseDataSource="True" FieldAliases.Text="" IgnoreDupParams="False" SQL.Text="select top 3 * from rgkopf " DatabaseName="AdsConnection" PropData="05704C65667402640470546F7002540A506172616D65746572730100"/>
    <TfrxADSQuery Name="RgPOs" UserName="RgPos" CloseDataSource="True" FieldAliases.Text="" Master="RgKopf" IgnoreDupParams="False" SQL.Text="select * from rgpos where rgkopf_id = :id " DatabaseName="AdsConnection" PropData="05704C656674039C000470546F7002540A506172616D657465727301010C48000000204E616D653D226964222044617461547970653D226674466C6F6174222045787072657373696F6E3D22262336303B52674B6F70662E262333343B4944262333343B262336323B220000"/>
  </TfrxDataPage>
  <TfrxReportPage Name="Page1" PaperWidth="210" PaperHeight="297" PaperSize="9" LeftMargin="0" RightMargin="0" TopMargin="0" BottomMargin="0" ColumnWidth="0" ColumnPositions.Text="" HGuides.Text="" VGuides.Text="">
    <TfrxMasterData Name="MasterData1" Height="22,67718" Left="0" Top="16" Width="793,7013" ColumnWidth="0" ColumnGap="0" DataSet="RgKopf" DataSetName="RgKopf" RowCount="0">
      <TfrxMemoView Name="RgKopfRGNR" Left="0" Top="0" Width="158,74026" Height="18,89765" DataField="RGNR" DataSet="RgKopf" DataSetName="RgKopf" Font.Charset="1" Font.Color="-16777208" Font.Height="-13" Font.Name="Arial" Font.Style="1" ParentFont="False" Text="[RgKopf."RGNR"]"/>
      <TfrxMemoView Name="RgKopfID" Left="166,29932" Top="0" Width="79,37013" Height="18,89765" DataField="ID" DataSet="RgKopf" DataSetName="RgKopf" Font.Charset="1" Font.Color="-16777208" Font.Height="-13" Font.Name="Arial" Font.Style="0" ParentFont="False" Text="[RgKopf."ID"]"/>
    </TfrxMasterData>
    <TfrxDetailData Name="DetailData1" Height="22,67718" Left="0" Top="60" Width="793,7013" ColumnWidth="0" ColumnGap="0" DataSet="RgPOs" DataSetName="RgPos" RowCount="0">
      <TfrxMemoView Name="RgPosRGKOPF_ID" Left="166,29932" Top="0" Width="79,37013" Height="18,89765" DataField="RGKOPF_ID" DataSet="RgPOs" DataSetName="RgPos" Font.Charset="1" Font.Color="-16777208" Font.Height="-13" Font.Name="Arial" Font.Style="0" ParentFont="False" Text="[RgPos."RGKOPF_ID"]"/>
      <TfrxMemoView Name="RgPosPOS_NR" Left="264,5671" Top="0" Width="79,37013" Height="18,89765" DataField="POS_NR" DataSet="RgPOs" DataSetName="RgPos" Font.Charset="1" Font.Color="-16777208" Font.Height="-13" Font.Name="Arial" Font.Style="0" ParentFont="False" Text="[RgPos."POS_NR"]"/>
      <TfrxMemoView Name="RgPosMENGE_SOLL" Left="359,05535" Top="0" Width="79,37013" Height="18,89765" DataField="MENGE_SOLL" DataSet="RgPOs" DataSetName="RgPos" Font.Charset="1" Font.Color="-16777208" Font.Height="-13" Font.Name="Arial" Font.Style="0" ParentFont="False" Text="[RgPos."MENGE_SOLL"]"/>
      <TfrxMemoView Name="RgPosMENGE_IST" Left="461,10266" Top="0" Width="79,37013" Height="18,89765" DataField="MENGE_IST" DataSet="RgPOs" DataSetName="RgPos" Font.Charset="1" Font.Color="-16777208" Font.Height="-13" Font.Name="Arial" Font.Style="0" ParentFont="False" Text="[RgPos."MENGE_IST"]"/>
    </TfrxDetailData>
  </TfrxReportPage>
</TfrxReport>
Ibi fas ubi proxima merces
sudo /Developer/Library/uninstall-devtools --mode=all
  Mit Zitat antworten Zitat