function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
nikkeynikkey 

Split Data Based on Year in a Visual force Page PDF

Can any on help me out how to get the Data split based on the year and product name in a visual force page which is in a PDF format .
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.But i get the data added in the same table for the 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       1800
Any help very much appreciated.