You need to sign in to do that
Don't have an account?

How to combine VF Page Filter and Standard Reports
Hi I have created a standard report and created a vf page filter. when I am combining both, with pagerefrence it is redirecting to the stanrd report.But it should get filtered with in the Vf page. can any one pls help me urgent.
MY Controller:
public class Newfcntrl{
public string locid{get;set;}
public map<Id,String> locmap= new map<Id,String>();
public List<SelectOption> getAvailableLocations() {
List<SelectOption> Opts = new List<SelectOption>();
for (Location__c l : [Select Id, Name From Location__c limit 1000]){
Opts.add(new SelectOption(l.Id, l.Name));
locmap.put(l.Id, l.Name);
}
return Opts;
}
public pagereference showrep(){
pagereference p = new pagereference('/00O90000007mGeE?pv0='+ locmap.get(locid));
system.debug('p-----'+p);
p.setRedirect(true);
return p;
}
}
My page:
<apex:page controller="Newfcntrl" sidebar="false" showHeader="false">
<apex:form id="theForm">
<apex:actionFunction name="testAF" action="{!showrep}" rerender="panid"/>
Location :<apex:selectList value="{!locid}" multiselect="false" size="1" onChange="testAF();">
<apex:selectOptions value="{!AvailableLocations}" />
</apex:selectList>
<apex:outputPanel id="panid">
<analytics:reportChart reportId="00O90000007mGeE"></analytics:reportChart>
</apex:outputPanel>
</apex:form>
</apex:page>
MY Controller:
public class Newfcntrl{
public string locid{get;set;}
public map<Id,String> locmap= new map<Id,String>();
public List<SelectOption> getAvailableLocations() {
List<SelectOption> Opts = new List<SelectOption>();
for (Location__c l : [Select Id, Name From Location__c limit 1000]){
Opts.add(new SelectOption(l.Id, l.Name));
locmap.put(l.Id, l.Name);
}
return Opts;
}
public pagereference showrep(){
pagereference p = new pagereference('/00O90000007mGeE?pv0='+ locmap.get(locid));
system.debug('p-----'+p);
p.setRedirect(true);
return p;
}
}
My page:
<apex:page controller="Newfcntrl" sidebar="false" showHeader="false">
<apex:form id="theForm">
<apex:actionFunction name="testAF" action="{!showrep}" rerender="panid"/>
Location :<apex:selectList value="{!locid}" multiselect="false" size="1" onChange="testAF();">
<apex:selectOptions value="{!AvailableLocations}" />
</apex:selectList>
<apex:outputPanel id="panid">
<analytics:reportChart reportId="00O90000007mGeE"></analytics:reportChart>
</apex:outputPanel>
</apex:form>
</apex:page>
If you take that off, what URL do you get redirected to (i.e. does it contain your pv0 parameter or not).