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
anukarthi_nimmalaanukarthi_nimmala 

Regarding passing of pageblock table values to another pages controller

Hi everyone,    

 

 

<apex:pageBlockTable value="{!Results}" var="ar">  
         <!--<apex:column headerValue="Number of tests" value="{!ar.Total}"/>  -->
             <apex:column headerValue="Date" value="{!ar.TestDate}"/>
             <apex:column headerValue="#Users Appeared for the Test" value="{!ar.usersappeared }"/>
             <apex:column headerValue="#Users Passed" value="{!ar.userspassed}"/>
             <apex:column headerValue="#Users Failed" value="{!ar.usersfailed}"/>
             <apex:column headerValue="Details">
                       <apex:commandButton value="Details" action="{!welcomepage}"/>
                      <!-- <apex:outputLink  value="/{!ar.id}">Details</apex:outputLink>-->
                    </apex:column>
             
      </apex:pageBlockTable>  




Iam displaying my Soql  query output bypassing the list to pageblock

My soql query is as follows

   public list<AggregateResult> lstAR = new list<AggregateResult>();  
   /*
   Note that any query that includes an aggregate function returns its results in an array of AggregateResult objects. AggregateResult is a read-only sObject and is only used for query results.
   Aggregate functions become a more powerful tool to generate reports when you use them with a GROUP BY clause. For example, you could find the count of all opportunities for a CloseDate.
    
   */  
   public reportfinal2()  
  {  
   lstAR = [SELECT TestDate__c, COUNT(id) Total,COUNT(Users_Appeared_for_the_test__c) usersappeared,   COUNT(Users_Passed__c) userspassed, COUNT(User_Failed__c) usersfailed  FROM UserTest__c GROUP BY TestDate__c];  
   }  
   


I used a wrapper class to pass and assigned the field values to the variables and passed the variables.Everything workking fine.




Now my requirement is when i click a button of column 1 i want to pass the field values of column 1 to controller so that i can write another soql query with filtercriteria as column value and i need to   display this output in another page .So up on button action i need to redirect to other page where i see output of soql query in a pageblock table.


So please tell me how should i do this .and tell me with a sample code if so its very helpful to me

 

 

                                                                                                                                                                           Thanks and  regards

 

                                                                                                                                                                                             Anu..~