You need to sign in to do that
Don't have an account?
nikkey
Based on the product name ,split data with year and get the column count in visual force page pdf
Can any on help me out how to get the Data split based on the year , product name and get the column count in a visual force page which is in a PDF format .
With Code i could retrive the data correctly.I need to split the product name based on the year.I get the Total but the subtotal is not getting calculated correctly and i get the data added in the same year.
For Example :In the above table i got the data for the Year 2014 with their product names and quarter value displayed.Now when i add the data for the Year 2015 with their product names and in the quarter ,it gets added in the Year 2014 itself.
But Im looking for this type of Table:
ProductName Year Q1 Q2 Q3 Q4 Total BXRC-25e4000-F-04 2014 100 200 300 400 1000 BXRC-25e4000-F-23 2014 200 200 400 Subtotal ------------ 300 200 300 600 1400
With Code i could retrive the data correctly.I need to split the product name based on the year.I get the Total but the subtotal is not getting calculated correctly and i get the data added in the same year.
For Example :In the above table i got the data for the Year 2014 with their product names and quarter value displayed.Now when i add the data for the Year 2015 with their product names and in the quarter ,it gets added in the Year 2014 itself.
But Im looking for this type of Table:
ProductName Year Q1 Q2 Q3 Q4 Total BXRC-25e4000-F-04 2014 100 200 300 400 1000 2015 100 100 BXRC-25e4000-F-23 2014 200 200 400 2015 300 300 Subtotal ------------ 700 200 300 600 1800VF CODE :
<tr class="foot"> <tr> <td colspan="3" style="text-align:left" align="right" class="header-table-data" >SubTotal :</td> <td colspan="1" class="header-table-data"> {!subtotalofquantity }, ${!subtotalofAmount }, </td> <td colspan="1" class="header-table-data"> {!subtotalofquantity }, ${!subtotalofAmount }, </td> <td colspan="1" class="header-table-data"> {!subtotalofquantity }, ${!subtotalofAmount }, </td> <td colspan="1" class="header-table-data"> {!subtotalofquantity }, ${!subtotalofAmount }, </td> </tr> </tr>
Public Integer subtotalofquantity{get;set;} Public Integer subtotalofamount{get;set;} subtotalofquantity=0; subtotalofamount=0; for(integer i=0;i<opflist.size();i++){ if(i==3){ subtotalofquantity+= integer.valueOf(opflist[0].gmod__Quantity__c); subtotalofquantity+= integer.valueOf(opflist[1].gmod__Quantity__c); subtotalofquantity+= integer.valueOf(opflist[2].gmod__Quantity__c); subtotalofamount+= integer.valueOf(opflist[0]. gmod__Amount__c); subtotalofamount+= integer.valueOf(opflist[1]. gmod__Amount__c); subtotalofamount+= integer.valueOf(opflist[2]. gmod__Amount__c); }Any help very much appreciated.