You need to sign in to do that
Don't have an account?
nikkey
Show Data for Current year and future years
Can any one help me out .How to show past,current and future years data in visual force page pdf format . I get the data displayed for the current year (2015 ).Any Example, Any Suggestion .I shall appreciate your help.
Code :
Code :
for (gmod__Opportunity_Forecast__c oppforecast: opflist) { String prodName = oppforecast.gmod__Product__r.Name; String monthText = oppforecast.gmod__Month_Text__c; Integer year = Integer.valueof(oppforecast.gmod__Year__c); Integer previousyear = date.today().year()-1; Integer currentyear = date.today().year(); Map<String, Decimal> quarterMap; Map<String, Decimal> amountMap; if ((monthText == 'Jan' || monthText == 'Feb' || monthText == 'Mar')&&(year==currentyear)){ quarterMap = Quarter1; system.debug('quarterMap@@@@@@@@'+quarterMap); amountMap = Amount1; if (quarterMap.containskey(prodName)) { quarterMap.put(prodName, quarterMap.get(prodName) + oppforecast.gmod__Quantity__c); amountMap.put(prodName, amountMap.get(prodName) + oppforecast.gmod__Amount__c); } else { quarterMap.put(prodName, oppforecast.gmod__Quantity__c); amountMap.put(prodName, oppforecast.gmod__Amount__c); }Similary for the quarters the code gets repeated.The logic should if the data exists or not it should display the o/p as per the products.
Please check with below queries an ddisplay in PDF .
I think it will help you if you want more than 20 or less than that you can change and add filter on that .
Please let me know if it helps .
Thanks for your reply....
As per the requirement ,i need to show the past ,present and future data in table in visual force page which is in PDF format.I have written a controller which has a wrapper class and the object if from managed package.So can we write any logic to get the data for the past ,present and future.Any help very much appreciated.
Contoller code :