public function subReport($name,$params=array())
    {
        $subReports = Utility::get($this->reportSettings, "subReports");
        $class = Utility::get($subReports, $name);
        if ($class!=null) {
            $params["@reportName"] = $name;
            $r = new $class($params);
            echo "<sub-report id='$name' name='$name'>";
            $r->run()->render();
            echo "</sub-report>";
            $GLOBALS["__ACTIVE_KOOLREPORT__"] = $this;
        } else {
            trigger_error(
                "Could not find [$name] subreport, please define this report in the "
                .Utility::getClassName($this)
                ."::settings()",
                E_USER_WARNING
            );
        }
    }
public function subReport($name,$params=array())
    {
        $subReports = Utility::get($this->reportSettings, "subReports");
        $class = Utility::get($subReports, $name);
        if ($class!=null) {
            $params["@reportName"] = $name;
            $r = new $class($params);
            echo "<sub-report id='$name' name='$name'>";
            $r->run()->render();
            echo "</sub-report>";
            $GLOBALS["__ACTIVE_KOOLREPORT__"] = $this;
        } else {
            trigger_error(
                "Could not find [$name] subreport, please define this report in the "
                .Utility::getClassName($this)
                ."::settings()",
                E_USER_WARNING
            );
        }
    }
public function subReport ( $ name , $ params = array ( ) ) { $ subReports = Utility :: get ( $ this -> reportSettings , "subReports" ) ; $ class = Utility :: get ( $ subReports , $ name ) ; if ( $ class != null ) { $ params [ "@reportName" ] = $ name ; $ r = new $ class ( $ params ) ; echo "<sub-report id='$name' name='$name'>" ; $ r -> run ( ) -> render ( ) ; echo "</sub-report>" ; $ GLOBALS [ "__ACTIVE_KOOLREPORT__" ] = $ this ; } else { trigger_error ( "Could not find [$name] subreport, please define this report in the " . Utility :: getClassName ( $ this ) . "::settings()" , E_USER_WARNING ) ; } }
Render a sub report inside report

@param string $name   The name of subrepor that defined in report settings
@param array  $params Parameters that you want to send to sub report

@return null
Render a sub report inside report