You need to sign in to do that
Don't have an account?
Help with visualforce page
public with sharing class ReportParamBuilderController {
Public PageReference redirectReport()
{
Id testId = ApexPages.currentPage().getParameters().get('id');
String cn = ApexPages.currentPage().getParameters().get('cn');
List<ReportParamBuilder_Config__c > listTest = [Select ReportId__c ,QueryObjectField__c , QueryObjectPrimaryRefField__c from
ReportParamBuilder_Config__c where QueryObjectPrimaryRefField__c = :testId];
String stringUrl;
For(ReportParamBuilder_Config__c obj : listTest)
{
stringUrl = stringUrl + ',' + obj.QueryObjectField__c;
}
PageReference p = new PageReference('/00OM0000000SNcO?pv0='+ stringUrl);
Return p;
}
can i get the visualforce for the above code . But the vf page should contain the the output link as mentioned in the pagereference and should redirect to that age
Thanks
On which event you want to show the report.
If its on button click... you can put your code in global class and define method as web service. From there return the url string and on button javascript do something
// Write Code to call the class method and return URL value.
window.location.href = <URL HERE>
Let me know if it helps you.