Integrate the report into a PHP application

You created a data source and at least one report design document. You can now add the necessary code to launch the report from a PHP application.

  1. If your data source needs to connect to a database, you need to establish the database connection.
  2. Configure the report.

    In this example, the report is configured to be output to PDF.

    // Configure the report
    $greRunnerObj = new FourjsReportRuntime($reportDesignFileName,"OrderReport\OrderReport");
  3. Instantiate the data source object from the data source library.
    // Run the report
    $reportData = new OrderReport\OrderReport($connection);
  4. Pass the object to the report engine for processing.