API version 4

- ‐

<<

右辺のCSVデータを読み込みます。

右辺のデータ型が CSV化可能オブジェクト の場合、右辺オブジェクトの保持するデータがCSV形式に変換されてTextFieldに読み込まれます。 それ以外のデータ型の場合、Objectクラスの読み込み処理が実行されます。

親のPrintRegionオブジェクトに行ヘッダ(HeaderField)を配置している場合は、CSVデータの列名が行タイトルとして設定されます。 (列名の設定されていないCSVデータを読み込んだ場合、行タイトルに空文字列が設定されます。) 行タイトルを独自に設定したい場合は、CSV読み込み後に設定してください。

呼出形式一覧

呼出形式

説明

<<(rhs)

右辺のデータを読み込んで値を設定します。

戻り値一覧

戻り値

説明

読み込み後のPrintRecordオブジェクト自体を返します。

引数一覧

引数

説明

rhs

読み込むオブジェクトを指定します。

例外

なし

関連項目

PrintRegion.<< オペレータ

KeyBreak イベント

HeaderField.keyBreakPriorityHeaderField.keyBreakTiming プロパティ



使用例 CRSダウンロード

Form formPrintRegion_operatorInput {
   x = 0; y = 0; width = 800; height = 600;
   PrintForm printform1 {
           x = 10; y = 72; width = 256; height = 362;
           TextField textfield1 {
                   x = 16; y = 8; width = 224; height = 16;
                   value="PrintRegion << CSV";
           }
           PrintRegion printregion1 {
                   x = 24; y = 24; width = 216; height = 144;
                   PrintHeader printheader1 {
                           height = 16;
                           HeaderField header[3] { width = 70; }
                   }
                   PrintRecord rec1    { height = 16; bgColor = "#FFCCFF"; TextField item[3]; }
                   PrintRecord rec2[2] { height = 16; bgColor = "#CCFFFF"; TextField item[3]; }
                   PrintRecord rec3[]  { height = 16; bgColor = "#FFFFCC"; TextField item[3]; }
                   PrintRecord rec4[2] { height = 16; bgColor = "#CCCCFF"; TextField item[3]; }
           }
           TextField textfield2 {
                   x = 16; y = 176; width = 224; height = 16;
                   value="PrintRecord[] << CSV";
           }
           PrintRegion printregion2 {
                   x = 24; y = 192; width = 216; height = 144;
                   PrintHeader printheader1 {
                           height = 16;
                           HeaderField header[3] { width = 70; }
                   }
                   PrintRecord rec1    { height = 16; bgColor = "#FFCCFF"; TextField item[3]; }
                   PrintRecord rec2[2] { height = 16; bgColor = "#CCFFFF"; TextField item[3]; }
                   PrintRecord rec3[]  { height = 16; bgColor = "#FFFFCC"; TextField item[3]; }
                   PrintRecord rec4[2] { height = 16; bgColor = "#CCCCFF"; TextField item[3]; }
           }
           var c = CSV(Item1,Item2,Item3) {
AAA,XXX,111
AAA,YYY,111
BBB,ZZZ,222
BBB,ZZZ,222
BBB,ZZZ,555
           };

           # rec1←1行目
           # rec2←2~3行目
           # rec3←4行目~最終行(要素数拡張)
           # rec4←読み込みなし
           printregion1 << c;

           printregion2.rec3 << c;
   }

   Button buttonPrint {
           x = 8; y = 8; width = 56; height = 24; title = "印刷";
           function onTouch(e) {
                   ^.printpreview1.clearPages();
                   ^.printpreview1.document = ^.printform1.printDocument();
           }
   }
   PrintPreview printpreview1 {
           x = 272; y = 8; width = 488; height = 472;
   }
}