FlexReport for WPF
RTF フィールド
フィールドとカスタムフィールド > RTF フィールド

リッチテキストフォーマット(RTF)フィールドは、書式設定されたテキストを表示するために使用されます。このボタンをクリックするとメニューが表示されます。そこから、同じレポート定義ファイルに含まれる他のフィールドを選択して RTF 形式で表示できます。これらはデータ連結された RTF フィールドです。

RTF フィールドは、特に差し込み印刷レポートの作成で使用されます。

FlexReportDesigner アプリケーションで RTF フィールドを使用した差し込み印刷を作成するには

  1. 新しいレポート C1FlexReportDesigner を作成します。
  2. 以下の SQL 文を指定して、Customers および Orders テーブルにレポートを連結します。
    SELECT
    Customers.CustomerID, Customers.CompanyName,
    Customers.ContactName, Customers.Address,
    Customers.City, Customers.Region, Customers.Country, Customers.PostalCode, Orders.OrderID, Orders.OrderDate, [Order Subtotals].Subtotal
    FROM Customers INNER JOIN ([Order Subtotals] INNER JOIN Orders ON [Order Subtotals].OrderID = Orders.OrderID) ON Customers.CustomerID = Orders.CustomerID WHERE CompanyName = "Ernst Handel"
  3. [挿入]タブから RTF フィールドを追加します。
  4. プロパティペインから、背景色を淡色に設定します。
  5. Text プロパティを次の式に設定します。
    "Dear " + ContactName + "," + vbcrlf + vbcrlf + _
    "Your order for past year totals to " + Format(Subtotal, "Currency") + vbcrlf + vbcrlf + _
    "Because you have been such a terrific customer, " + _
    "we decided to credit your account with $0.10. The amount will be credited in next 10 days. Your Address for future correspondance is "+"Address" + vbcrlf + vbcrlf + _
    "Congratulations!"
  6. 次のようにフィールドを配置します。

  7. レポートをプレビュー表示します。