ktrinad Posted August 19, 2006 Share Posted August 19, 2006 By: Harish - harishhebbar Howto generate Sequence No and to reset group 2004-01-15 04:03i am facing problem reseting group sequence no. i am generating sequence no , but i am not able to reset by group . <variable name="SerialNo" class="java.lang.Integer" resetType="Group" resetGroup="ProjectSubGroup" calculation="System"> <initialValueExpression><![CDATA[($V{SerialNo} != null)?(new Integer($V{SerialNo}.intValue() + 1)):(new Integer(1))]]></initialValueExpression> </variable> once seq is increased to say 10 , and when group reset is done, sequence no remains as 10 forever. <group name="ProjectSubGroup"> <groupExpression><![CDATA[$F{projecttype}]]></groupExpression> whenever projecttype is changed sequence no should reset to 1 and should start incrementing as long as projecttype remains same. By: Vinod Kumar Singh - vinodsingh RE: Howto generate Sequence No and to reset g 2004-01-15 21:05You can use inbuilt variable groupname_COUNT. Where group name the name of group, in your case ProjectSubGroup. It works just like REPORT_COUNT, but it reset to 1 when group changes. By: Harish - harishhebbar RE: Howto generate Sequence No and to reset group 2004-01-18 22:12Thanks it works fine. 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