Jump to content

blank row, Get the totals, start into new page


vsoneta

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

 

 

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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...

Link to comment
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

STILL DON"T KNOW-- PLEASE HELP

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

Link to comment
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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...