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
anil 007anil 007 

apex repea controller not working properly plz help

<apex:page controller="monthlyreport" >
<apex:form >
<apex:pageBlock title="Monthly Report">
<p>
Select Date:
<apex:selectList value="{!dt}" id="abc" size="1" >
<apex:selectOptions value="{!dateinfo}" >
<apex:actionSupport event="onchange" reRender="cdf,theRepeat" rendered="true" />
</apex:selectOptions>
</apex:selectList>
</p>
<apex:commandButton value="Generate" action="{!setdivName}" reRender="cdf,theRepeat"/>
</apex:pageBlock>
</apex:form>
<apex:pageBlock title="Report" id="cdf">
<apex:outputPanel rendered="{!dt=null}">
<table border='1' size='100' columnswidth="150px,150px" cellpadding="6" >
<tr>
<th>S.NO.</th>
<th>Particulars</th>
<th>Uom</th>
<th>Quantity</th>
<th>Rate</th>
<th>Amount</th>
</tr>
<apex:repeat value="{!LineItems}" var="s" id="theRepeat" >
<tr>
<td>{!s.itm}</td><td>{!s.itm}</td><td>{!s.itm}</td><td>{!s.itm}</td><td>{!s.itm}</td>
</tr>
</apex:repeat>
</table>
</apex:outputPanel>
</apex:pageBlock>
</apex:page>

public class monthlyreport {

  

    public String item { get; set; }

    public String monthlyreport { get; set; }

    public PageReference setdivName() {
        return null;
    }


  public integer s;

    public Date dt { get; set; }

    public String getDe() {
        return null;
    }

 //public List<wrapperList> LineItems{get;set;}
    public List<wrapperList> getLineItems(){return LineItems;}

//public List<Sales_det__c> sal,sal1,sal2;
   List<Saledate__c> seo=[select  date2__c from Saledate__c where id!=null ];
  public List<Sales_det__c> Sal=[select date__c,item_meas__c,Item_name1__c,Item_rate1__c,locat__c,quantity__c from Sales_det__c where date__c=:dt];
List<wrapperList> LineItems = new List<wrapperList>();
public List<selectoption> getdateinfo()
{

List<selectoption> se1=new List<selectoption>();
se1.add(new SelectOption('Select Date','select Date'));
for(Saledate__c  sel:seo)
{
se1.add(new SelectOption(sel.id,String.valueOf(sel.date2__c)));

}

return se1;
}

 
  
    public Integer getsno()
     {
     Integer i = [select count() from Sales_det__c where date__c=:dt];
     return i;
     }


  public String  getsno1()
   {
    String s=[select  Item_name1__c from Sales_det__c where  date__c=:dt ].item_name1__c;
//String s1=String.valueOf(s.Item_name1__c);
return s;

}


  public List<Sales_det__c> getsno2()
   {
   List<Sales_det__c> s1=[select  item_meas__c  from Sales_det__c where  id =:'a0L900000000a3p' ];

return s1;

}


  public List<Sales_det__c> getsno3()
   {
   List<Sales_det__c> s2=[select quantity__c from Sales_det__c where  id =:'a0L900000000a3p' ];

return s2;

}
 List<Sales_det__c> dat=[select  item_meas__c  from Sales_det__c where date__c=:dt];


  public List<Sales_det__c> getsno4()
   {
   List<Sales_det__c> s3=[select  Item_rate1__c  from Sales_det__c where  id =:'a0L900000000a3p' ];

return s3;

}

  public String  getsno5()
   {
  
return null;
}
public String[] getStrings() {

 List<Sales_det__c> s=[select date__c,item_meas__c,Item_name1__c,Item_rate1__c,locat__c,quantity__c from Sales_det__c where id='a0L900000000a3p'  ];
 //  LineItems.add(new wrapperList(sal));
 if(!s.isEmpty()){
   LineItems.add(new wrapperList(s));
 }
//String s1=String.valueOf(s.Item_name1__c);

        return new String[]{'ONE','TWO','THREE'};

    }
   public class wrapperList{
    public List<Sales_det__c> l{get;set;}
     public String div{get;set;}
       public String prod{get;set;}
       public integer no{get;set;}
        public decimal prod1{get;set;}
       public String itm{get;set;}
       public decimal rev{get;set;}
    public List<String> ttt=new List<String>();
       public List<String> s;
   
public wrapperList(List<Sales_det__c> li){
no=1;
l=li;
  if(!li.isEmpty() && li.size()>0){
   for(Sales_det__c b:li){
   no=no+1;
  if(b!=null)
  {
  
div=b.item_meas__c;
itm=b.Item_name1__c;
rev=b.Item_rate1__c;
prod=b.locat__c;
prod1=b.quantity__c;

  }
     
   }
   
  }

}
     
   }

}

 

please help me iam not able to find out problem with repeat controller

 

 

 

 

please help mee

 

 

 

Thanks in adv

 

Anil