diff --git a/core/Plugin/Report.php b/core/Plugin/Report.php index a907b0f709c77a69eaddc74157e0686e79ab5afa..6d950babd2b5482b440b6093b138247b23e88f8e 100644 --- a/core/Plugin/Report.php +++ b/core/Plugin/Report.php @@ -601,6 +601,16 @@ class Report return $subtableReport->getDimension(); } + /** + * Returns true if the report is for another report's subtable, false if otherwise. + * + * @return bool + */ + public function isSubtableReport() + { + return $this->isSubtableReport; + } + /** * Fetches the report represented by this instance. * @@ -722,7 +732,7 @@ class Report public static function getForDimension(Dimension $dimension) { return ComponentFactory::getComponentIf(__CLASS__, $dimension->getModule(), function (Report $report) use ($dimension) { - return !$report->isSubtableReport + return !$report->isSubtableReport() && $report->getDimension() && $report->getDimension()->getId() == $dimension->getId(); });