Disable chart links on dashboard page

This public forum is for user-to-user discussions of PHP Report Maker. Note that this is not support forum.

Disable chart links on dashboard page

Postby kirondedshem » Sun Oct 08, 2017 1:44 pm

when I generate a dashboard page, all the graphs can link to you back to thier respective report pages.

This is ok and I feel I will need it in most of my reports, but there are times I would like to disable the links to the report pages when a user clicks on a graph.

I am able to do this by revoking permissions to the specific report pages, that way a user has access to a dashboad page but when they click on the report it says you dont have permission and takes him back to dashboard page.

So am wondering if there is better a way I can do it in any exeisting event or even in jquery fro a specific dashboard page
kirondedshem
 
Posts: 330
Joined: Sat Jan 28, 2017 7:13 pm

Re: Disable chart links on dashboard page

Postby Webmaster » Mon Oct 09, 2017 10:00 am

You can use the Chart_Rendered server event to clear the click url. For example:

if ($this->ID == "<Table>_<Chart>") {
//var_dump($this);
$doc = new DOMDocument();
$doc->loadXML($chartxml);
$doc->documentElement->setAttribute('clickurl', '');
$chartxml = $doc->saveXML();
}
Webmaster
 
Posts: 10734
Joined: Fri Aug 06, 2004 5:59 pm

Re: Disable chart links on dashboard page

Postby kirondedshem » Tue Oct 10, 2017 1:27 pm

I think you meant Chart_Rendered(&$chartxml)

Thanks it works
kirondedshem
 
Posts: 330
Joined: Sat Jan 28, 2017 7:13 pm


Return to General Discussion (PHP Report Maker)