# blank row, Get the totals, start into new page

## Recommended Posts

Hello,

I need help..

I have query that returns this coulumns --

TR, STR#, Date, Product,Supplu,Allow, total RT,WH orderby STR# and WH

So the records would be

43,   0602, 09-01-2009, 120945.36,0.00,0.00,120945.36 ,00,00

12,   0602, 09-01-2009, 17.16,0.00,.51,21.54,01,01

12,   0602, 09-01-2009, 17.16,0.00,.51,21.54,01,01

12,   0602, 09-01-2009, 17.16,0.00,.51,21.54,01,01

43,   0605, 09-01-2009, 120945.36,0.00,0.00,120945.36 ,00,00

12,   0605, 09-01-2009, 17.16,0.00,.51,21.54,01,01

12,   0605, 09-01-2009, 17.16,0.00,.51,21.54,01,01

12,   0605, 09-01-2009, 17.16,0.00,.51,21.54,01,01

....

So now in Ireport

1) it should a 2 blank rows as soon it TR =='43' and then continue

2) Should give the totals as soon as the previous ST# is not equal to next STR# Vertical which doesn't include row which is TR ==43

3) Once the above 2 is done then new group should start in new page.

For eg the above will be shown as

TR STR#      Date             Product      Supply Allow total                 RT WH

43   0602  09-01-2009   -120945.36   0.00     0.00  120945.36    00   00

12   0602  09-01-2009             17.16   0.00        .51           21.54    01   01

01   0602  09-01-2009             17.16   0.00        .51           21.54    01   01

73   0602  09-01-2009             17.16   0.00        .51           21.54    01   01

* TOTAL *               51.48   0.00      1.53           53. 01

NEXT PAGE:

TR STR#      Date             Product      Supply Allow total                 RT WH

43   0605  09-01-2009   -120945.36   0.00     0.00  120945.36    00   00

12   0605  09-01-2009             17.16   0.00        .51           21.54    01   01

01   0605  09-01-2009             17.16   0.00        .51           21.54    01   01

73   0605  09-01-2009             17.16   0.00        .51           21.54    01   01

* TOTAL *               51.48   0.00      1.53           53. 01

Please suggest as to how this can be implemented

• Replies 3
• Created

#### Popular Days

I Got the total to display after each group based on STR# -- Using Group by when creating jrmxl.

1) But still now logic to calc to SUM of the rows of that column expect the row that has TR=43

2) Show a blank line after TR=43

3) Each new group should start in new page...

##### Share on other sites

1) But still now logic to calc to SUM of the rows of that column expect the row that has TR=43

Changed Varuable expression of the the variable properties:

<variableExpression><![CDATA[(!((\$F{TR}.toString()).equals( "43"))?\$F{Product}:null)]]></variableExpression>

2) Show a blank line after TR=43

3) Each new group should start in new page..

In Group Header selected the propertie:

<group name="STR#" isStartNewPage="true">

The latest code is attached

##### Share on other sites

2) Show a blank line after TR=43

Added a logic to display a dotted line

<line>
<reportElement x="0" y="27" width="800" height="1">
<printWhenExpression><![CDATA[new Boolean((\$F{TR}.toString()).equals( "43"))]]></printWhenExpression>
</reportElement>
<graphicElement>
<pen lineStyle="Dotted" lineColor="#000000"/>
</graphicElement>
</line>

Attached with the latest code that has answers to the questions