<< Back to embedding reports

Embed Report Output

This embeds report output in a page. Reportico allows extra parameters to be passed to suppress elements of the output and also provide criteria parameters to the report.

        $reportico = \Yii::$app->getModule('reportico');
        $engine = $reportico->getReporticoEngine();        // Fetches reportico engine
        $engine->access_mode = "REPORTOUTPUT";             // Allows access to report output only
        $engine->initial_execute_mode = "EXECUTE";         // Just executes specified report
        $engine->initial_project = "northwind";            // Name of report project folder    
        $engine->initial_report = "salestotals";           // Name of report to run
        $engine->bootstrap_styles = "3";                   // Set to "3" for bootstrap v3, "2" for V2 or false for no bootstrap
        $engine->force_reportico_mini_maintains = true;    // Often required
        $engine->bootstrap_preloaded = true;               // true if you dont need Reportico to load its own bootstrap
        $engine->clear_reportico_session = true;           // Normally required
        $engine->execute();  

Monthly Sales

  Output: HTML PDF CSV
Style Table Form
Show
 
Country
Customer ANY
Order Date  -
Unable To Continue:
Notice: A non well formed numeric value encountered
Main Report Query - Error: Query Failed

SELECT customers.country, DATE_FORMAT(orderdate, "%Y %M") month, sum((order_details.unitprice - discount) * order_details.quantity) total_discounted_sales, sum((order_details.unitprice) * order_details.quantity) total_sales FROM customers join orders on customers.customerid = orders.customerid join order_details on orders.orderid = order_details.orderid join products on order_details.productid = products.productid WHERE 1 = 1 AND DATE(orderdate) BETWEEN '1996-01-01' AND '1998-12-31' GROUP BY country, month order by country, month

Status 0 -