You need to sign in to do that
Don't have an account?

How to show current and future years data in a visual force page
Can any one help me out .How to show current and future year data in visual force page pdf format .Based on the query i get the data retrived for the current year (2014 )and When i add the data for the year (2015) it gets added it the year (2014) but the data should get displayed separately .
Any Example,Any Suggestion .I shall appreciate your help.
This is the Table (expected output)
But i get the o/p as:
Any Example,Any Suggestion .I shall appreciate your help.
This is the Table (expected output)
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
But i get the o/p as:
ProductName Year Q1 Q2 Q3 Q4 Total BXRC-25e4000-F-04 2014 500 200 300 400 1400 BXRC-25e4000-F-23 2014 200 200 400 Subtotal ------------ 900 200 400 800 1800
When you are querying the records use Order by ProductName. So that all the records will be in the expeted order.
I tried query in all the ways but not luck.
Here is the Code : The problem im unable to get the column data added or each quarter and split the data as per the year.Any help very much appreciated.
once try this query i.e add "gmod__Product__r.Name" to Order By
List < gmod__Opportunity_Forecast__c > opflist = [ Select id, Name, gmod__opportunity__r.id, gmod__Quantity__c, gmod__Price__c,
gmod__Month__c, gmod__date__c, gmod__Quarter__c, gmod__Amount__c, Actual_Price__c, gmod__Year__c, gmod__Month_Text__c, Forecast_Date__c, gmod__Product__r.Name, gmod__opportunity__r.name from gmod__Opportunity_Forecast__c
WHERE gmod__Product__c != null and gmod__opportunity__r.id = : opp.id
Order BY gmod__Product__r.Name, gmod__Year__c, gmod__Month__c asc];
I think you are displaying data of Wrapper class right ?