You need to sign in to do that
Don't have an account?
sekhara
very urgent issue.....
hi
my requirement is to add the rows & column values like
1 2 3 = 6
2 3 1 = 6
1 1 1 = 3
4 6 5
so i wrote code like this but will saving
Error: Compile Error: Invalid type: objBudClass at line 19 column 40 .
Can any one help on this issue.
Thank q .
public class GroupedQuery123
{
public list<AggregateResult> lstAr = new list<AggregateResult>();
public GroupedQuery123()
{
lstar = [SELECT Product_Service_Category_Poc__c, Case_Type_Poc__c ,
GROUPING(Product_Service_Category_Poc__c ) p1 , GROUPING(Case_Type_Poc__c ) p2,
COUNT(casenumber) tot1
FROM Case
where CreatedDate = THIS_WEEK and Status = 'open'
GROUP BY CUBE(Product_Service_Category_Poc__c , Case_Type_Poc__c )
order by GROUPING(Product_Service_Category_Poc__c ) , GROUPING(Case_Type_Poc__c )];
}
public list<BudClass> getResults(){
list<BudClass> lstResult = new list<BudClass>();
for(AggregateResult ar : lstAr){
BudClass objBudClass = new objBudClass(ar);
lstResult.add(objBudClass);
}
return lstResult;
}
class BudClass{
public Double tot1{get;set;}
public String p1 {get;set;}
public String p2 {get;set;}
public BudClass(AggregateResult ar){
tot1 = (Double) ar.get('tot1');
p1= (String) ar.get('p1');
p2= (String) ar.get('p2');
}
}
}
error is in this line
BudClass objBudClass = new objBudClass(ar);
it should be (remove obj)
BudClass objBudClass = new BudClass(ar);
But as u know the values r not integer they r string only so can u help on this issue.
try changing the lines
to
Error is gone but values are coming in integer only.
so you want to show string values on vf page but you are getting inetger values on vf page. is that what you are looking for.
ya exactly
that what i want
can you post the vf code
i dont find any coding mistakes. say for example ar.get('p1') value is 25 then what are you expecting to be shown on the vf page?
Here
p1 = Product_Service_Category_Poc__c
p2 = Case_Type_Poc__c
tot1 = count (Casenumber)
my requirement is :
abc ----------------------> p1
TVA1236
wocs 1236
246
:
:
:
:
p2