+ Start a Discussion
CBBsfdcCBBsfdc 

Develop a Visualforce Page to display Three Checkboxes Open/Closed WON / Closed lost Opportunities User should be able to check the checkboxes and view the Opportunities based on the selected checkboxes please refer below pic

User-added image
Best Answer chosen by CBBsfdc
SARI4SARI4
Hi  CBB123456,

Here is a sample code for you 
VF Page
<apex:page controller="opportunityReportController" sidebar="false">
  
  <apex:form >
      <apex:outputText >Open</apex:outputText>
      <apex:inputCheckbox value="{!Open}" />
      <apex:actionSupport event="onclick" rerender="myTable" action="{!mytableData}"/> &nbsp;&nbsp;
      <apex:outputText >Closed/Won</apex:outputText>
      <apex:inputCheckbox value="{!Won}"/>
      <apex:actionSupport event="onclick" rerender="myTable" action="{!mytableData}"/>&nbsp;&nbsp;
      <apex:outputText >Closed/Lost</apex:outputText>
      <apex:inputCheckbox value="{!Lost}"/>
      <apex:actionSupport event="onclick" rerender="myTable" action="{!mytableData}"/>
      
      <apex:pageBlock >
      <apex:pageBlockTable value="{!oppList}" var="op"  id="myTable">
      <apex:column value="{!op.name}" headerValue="Name"/>
      <apex:column value="{!op.stageName}" headerValue="Stage"/>
      </apex:pageBlockTable>
      </apex:pageBlock>
  </apex:form>
</apex:page>
Controller
public class opportunityReportController {
    public List<opportunity> oppList { get; set; }
    public boolean Lost { get; set; }
    public boolean Won { get; set; }
    public boolean Open { get; set; }
    
    public opportunityReportController (){
    open=false;
    lost=false;
    won=false;
    }
    public void mytableData() {
    oppList =new List<opportunity>();
    list<opportunity> oppOpenList=[Select id,name,stageName from opportunity where stageName NOT IN('Closed Won','Closed Lost')];
    list<opportunity> oppWonList=[Select id,name,stageName from opportunity where stageName ='Closed Won'];
    list<opportunity> oppLostList=[Select id,name,stageName from opportunity where stageName ='Closed Lost'];
    
    system.debug('>>>>>i am here>>');
    if(open==true && Won==false && Lost==False){
        oppList.addall(oppOpenList);
    }
    else if(open==true && Won==true && Lost==False){
        oppList.addall(oppOpenList);
        oppList.addall(oppWonList);
    }
   else if(open==true && Won==true && Lost==true){
        oppList.addall(oppOpenList);
        oppList.addall(oppWonList);
        oppList.addall(oppLostList);
    }
    else if(open==false && Won==true && Lost==false){
        oppList.addall(oppWonList);
    }
    else if(open==false && Won==true && Lost==true){
        oppList.addall(oppWonList);
        oppList.addall(oppLostList);
    }
    else if(open==false && Won==false && Lost==true){
        oppList.addall(oppLostList);
    }
    else if(open==true && Won==false && Lost==true){
        oppList.addall(oppLostList);
        oppList.addall(oppOpenList);
    }
    
    }

    
}

If it fix your problem,  Please dont forgot to mark it as best answer.