+ Start a Discussion
GYAN ANDRUSGYAN ANDRUS 

Hi ,Can u please me out,I have added the vf page in home tab,i am redirecting the reports

But the report showing in  inside the block,i want it in main report tab


public with sharing class ReportController {
    
    public PageReference showReports() {
        try{
            Report objReport = [Select Id from Report where name=:selectedReport];
            PageReference report = new PageReference('/'+objReport.Id);
            report.setRedirect(true);
            return report;
        }catch(Exception e){
            return null;
        }
    }
    
    
    public String selectedReport{get;set;}
    public List<String> selectedCategories { get; set; }
    
    public List<SelectOption> getReportsOptions() {
        List<SelectOption> countryOptions = new List<SelectOption>();
        countryOptions.add(new SelectOption('','-None-'));
        countryOptions.add(new SelectOption('No Of Open Contracts','No Of Open Contracts'));
        countryOptions.add(new SelectOption('Number of Contracts','Number of Contracts'));
        return countryOptions;
    }
    
    
    public List<SelectOption> getCategories() {
        
        List<SelectOption> categories = new List<SelectOption>();
        
        
        
        return categories;
        
    }
    
    
}