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
CTU007CTU007 

is it possible to reference report result in VF page (standardcontroller="report")

Please don't laugh if this makes no sense.

 

I am struggling to create some reports to show revenue contribution(% of total revenue) of top 3, top 5, and top 10 customers in each year.

 

We are using multiple currencies and we want the calculation to be based on our company currency, ie, amount(converted).

 

I created some roll-up-summary field in account by summarizing the amount in number, not currency. (a number field in opportunity which equals amount)

 

I can run report to show $$$ from top customers in each year.

 

If I can then use the result from the report in VF page, it would be much easier. Otherwise, I would assume I need to write some coding which is beyong my capability.

 

so, if we can use the report as standard controller, since each report has a unique name, so we can use the result like using fields from an object, no coding would be necessary.

 

 

There are lots of requirements like this and I would love to do it in this way.

 

Any comments? 

 

Cool_DevloperCool_Devloper

As far as I am aware, you cannot run a report like that from a VF page:(

You need to build a custom logic/page for this in VF. Experts, pls correct me if I am wrong!!

Cool_D

CTU007CTU007

This S-control can enable us to show report in a dashboard, maybe we could think about this idea?

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <link href="/dCSS/Theme2/default/common.css" type="text/css" rel="stylesheet" > </head> <script type="text/javascript"> /* simple report in an scontrol, can be used in a dashboard! (taken from Ron Hess's code) */ var daView = '/00O0000000720IE'; // Change to your report! function refreshView() { // run the list view, fetch into a string var response = doGet ( daView ); // mess with the response to locate just the list stuff we want var idx ; //idx = response.indexOf('<div class="bNext">'); //idx = response.indexOf('<div class="listAccount">'); idx = response.indexOf('<div class="reportOutput">'); response = response.substr(idx); // yank off the tab and side bar // var endidx = response.indexOf('<!-- End ListElement -->'); var endidx = response.indexOf('<label for="drillbreak">'); response = response.substr(0,endidx); // rip off the bottom of the page // Get rid of the check boxes! response = response.replace(/type\=\"checkbox\"/g,"type\=\"hidden\"") // finaly edit every hyperlink to run in the parent window ... response = response.replace(/<a href\=/g,"<a target\=\"_parent\" href\=") document.getElementById('main').innerHTML = response; } // synchronous implementation of GET function doGet (url){ var xmlhttp = false; if (!xmlhttp){ try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch(e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch(e) { xmlhttp = new XMLHttpRequest(); } } } if (xmlhttp){ // alert('hit: ' + url); // synchronous call b/c we NEED the timezones to be // loaded properly before loading any events xmlhttp.open("GET", url, false); xmlhttp.send(null); var text = xmlhttp.responseText; return text; } } </script> <body onload="refreshView();" style="BACKGROUND-COLOR: #F3F3EC;" > <table cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td id="main" ></td> </tr> </tbody> </table> </body> </html>