Search code examples
phpmysqlpentaho

How do I integrate a pentaho report to a php webpage sending parameters to select certain data?


I'm using symfony framework and I need to display a report of for example the first quarter of the year, or the second, etc based on what the user selects on a dropwdown. The Pentaho report runs on a Tomcat Server, and I need to request a report selected by the parameter sent. I looked and there's no documentation on sending parameters to pentaho reports.

How could I do this?....There's 0 documentation about how to use pentaho from a php script....
I've found this to login but deosn't specify anything about sending parameters

<?php

    session_start();
    require_once "HTTP\Client.php";

    $endpointUrl = "http://localhost:8080/pentaho/Home";
    $userName="joe";
    $password="password";

    $manager = new HTTP_Client_CookieManager(true);
    $httpc = new HTTP_Client(null, null, $manager);

    $httpc->get("$endpointUrl?userid=$userName&password=$password");
    $response = $httpc->currentResponse();

    //var_dump($response);

    $url= "http://localhost:8080/pentaho/Home?userid=joe&password=password";

?>

Solution

  • Pentaho User Console is not created to be used from PHP. I think the recommended way to interact with Pentaho is to use XMLA and MDX queries directly to Mondrian. Look for instance at this answer: MDX query from PHP

    You can find the XMLA endpoint on /Xmla, in your situation it should be http://localhost:8080/pentaho/Xmla