vsoneta Posted September 14, 2009 Share Posted September 14, 2009 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,0012, 0602, 09-01-2009, 17.16,0.00,.51,21.54,01,0112, 0602, 09-01-2009, 17.16,0.00,.51,21.54,01,0112, 0602, 09-01-2009, 17.16,0.00,.51,21.54,01,0143, 0605, 09-01-2009, 120945.36,0.00,0.00,120945.36 ,00,0012, 0605, 09-01-2009, 17.16,0.00,.51,21.54,01,0112, 0605, 09-01-2009, 17.16,0.00,.51,21.54,01,0112, 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 ==433) 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 0101 0602 09-01-2009 17.16 0.00 .51 21.54 01 0173 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 0101 0605 09-01-2009 17.16 0.00 .51 21.54 01 0173 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 More sharing options...
vsoneta Posted September 14, 2009 Author Share Posted September 14, 2009 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=432) Show a blank line after TR=433) Each new group should start in new page... Link to comment Share on other sites More sharing options...
vsoneta Posted September 15, 2009 Author Share Posted September 15, 2009 1) But still now logic to calc to SUM of the rows of that column expect the row that has TR=43Changed 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=43STILL DON"T KNOW-- PLEASE HELP3) 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 More sharing options...
vsoneta Posted September 15, 2009 Author Share Posted September 15, 2009 2) Show a blank line after TR=43Added 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now