2013-07-27 10 views
5

基本的に従業員が記入するタイムシートであるレポートを作成しました。したがって、従業員のデータで事前に設定された行(例:名前/ 苗字…)。ページの残りのスペースを静的フィールドで埋めてください

私のSQL要求は、16人の従業員レコードを取得します。 1ページには13行しか含まれていないので、自動的に最後の3行の2ページ目が作成されます。私の問題(および要件)は、13行を含む2番目のページを作成することです。そのうち3つはレコードで満たされ、10個は空白のままになります。ここで

は一例です:

enter image description here

はどのように私はそれを行うことができますか?

余分なページを13個の空白行で作成したい場合はどうすればよいですか?

誰かが私を助けてくれますか?

+0

固定数の行または動的(ページ上の空き領域によって異なります)を追加しますか? –

+0

実際には、1つの行の高さが変更された場合、過度に時間を費やすことを避けるために動的に行うほうがよいでしょう。 –

答えて

-2

私はjaspersoft communautyフォーラムに私の答えを得た:http://community.jaspersoft.com/questions/817708/resolved-how-fill-reports-blank-space-empty-row-table

原理は、ここで、バックグラウンドのバンドをカスタマイズすることであるモデルの例である:それはどのようなデータソースにあなたを依存

<background> 
<band height="555" splitType="Stretch"> 
<rectangle> 
<reportElement uuid="ee3fa6a5-eddb-4b38-b834-f2658bcf92d1" x="0" y="59" width="800" height="427"/> 
</rectangle> 
<line> 
<reportElement uuid="4494e946-4ff5-4d57-b3eb-9d64eda302c4" x="0" y="95" width="800" height="1"/> 
</line> 
<line> 
<reportElement uuid="4494e946-4ff5-4d57-b3eb-9d64eda302c4" x="0" y="125" width="800" height="1"/> 
</line> 
<line> 
<reportElement uuid="4494e946-4ff5-4d57-b3eb-9d64eda302c4" x="0" y="155" width="800" height="1"/> 
</line> 
<line> 
<reportElement uuid="4494e946-4ff5-4d57-b3eb-9d64eda302c4" x="0" y="185" width="800" height="1"/> 
</line> 
<line> 
<reportElement uuid="4494e946-4ff5-4d57-b3eb-9d64eda302c4" x="0" y="215" width="800" height="1"/> 
</line> 
<line> 
<reportElement uuid="4494e946-4ff5-4d57-b3eb-9d64eda302c4" x="0" y="245" width="800" height="1"/> 
</line> 
<line> 
<reportElement uuid="4494e946-4ff5-4d57-b3eb-9d64eda302c4" x="0" y="275" width="800" height="1"/> 
</line> 
<line> 
<reportElement uuid="4494e946-4ff5-4d57-b3eb-9d64eda302c4" x="0" y="305" width="800" height="1"/> 
</line> 
<line> 
<reportElement uuid="4494e946-4ff5-4d57-b3eb-9d64eda302c4" x="0" y="335" width="800" height="1"/> 
</line> 
<line> 
<reportElement uuid="4494e946-4ff5-4d57-b3eb-9d64eda302c4" x="0" y="365" width="800" height="1"/> 
</line> 
<line> 
<reportElement uuid="4494e946-4ff5-4d57-b3eb-9d64eda302c4" x="0" y="395" width="800" height="1"/> 
</line> 
<line> 
<reportElement uuid="4494e946-4ff5-4d57-b3eb-9d64eda302c4" x="0" y="425" width="800" height="1"/> 
</line> 
<line> 
<reportElement uuid="4494e946-4ff5-4d57-b3eb-9d64eda302c4" x="0" y="455" width="800" height="1"/> 
</line> 
<line> 
<reportElement uuid="01f3d5fc-9d23-4c7b-96cf-0ff7b3285400" x="160" y="59" width="1" height="427"/> 
</line> 
<line> 
<reportElement uuid="01f3d5fc-9d23-4c7b-96cf-0ff7b3285400" x="320" y="59" width="1" height="427"/> 
</line> 
<line> 
<reportElement uuid="01f3d5fc-9d23-4c7b-96cf-0ff7b3285400" x="480" y="59" width="1" height="427"/> 
</line> 
<line> 
<reportElement uuid="01f3d5fc-9d23-4c7b-96cf-0ff7b3285400" x="639" y="59" width="1" height="427"/> 
</line> 
</band> 
</background> 
0

使用しています... JavaBeansをデータソースとして使用している場合は、簡単に実行できます。ちょうど10の豆(ヌル値)とwhollaを追加してください...あなたは2番目のページに3(前のページレコード)+ 10(空白のレコード)を取得します.... さらに、私はあなたの13レコードを1ページテーブル内のセルのサイズを減らすか、レポート内の任意のものをリストします。

1

バックグラウンドバンドにグリッドを描画し、他のすべてのバンドでプロパティopaqueをtrueに変更します。

0

私は同じ問題があり、これが私を助けました。 デザイナータブのjrxmlファイルの表をクリックし、プロパティに移動して、式フィールドに「$ V {REPORT_COUNT} == 1」を入力します。 「空白のときに行を削除する」にチェックをつけてください。