KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Storing reports on S3 #2912

Closed Richb201 opened this topic on on Dec 20, 2022 - 1 comments

Richb201 commented on Dec 20, 2022

I am creating a number of reports that I display in the browser. This one, for example, downloads some Excel workbooks to the users PC. I have decided that I also want to save the reports in S3, for later encryption and download.

Can I change ))->toBrowser($this->session->userdata('campaign') . "_workbook.xlsx"); to ALSO create a file (on the server) at the same time?

   public function audit()
    {
        $title = sprintf("Audit Workbook for %s", $this->session->userdata('campaign'));
        $description = sprintf("paramaters used by Research Study Online to build for %s", $this->session->userdata('campaign'));
        $report = new MyExportExcel;
//        $report->run()->exportToExcel()->toBrowser($this->session->userdata('campaign') . "_workbook.xlsx");
        $report->run()->exportToExcel(array(
            "properties" => array(
                "creator" => "Research Study Online",
                "title" => $title,
                "description" => $description,
                "subject" => "Audit Workpapers",
                "keywords" => "",
                "category" => "",
            )
        ))->toBrowser($this->session->userdata('campaign') . "_workbook.xlsx");

    }
Richb201 commented on Dec 20, 2022

I found this:


dataStore() #
After report is run, data will be stored at dataStores, you can access them with dataStore method

->dataStore(string $storeName)
Example:


$report = new MyReport;

$report->run();

$result = $report->dataStore("result");

What do you mean "you can access them"??? Is $result a path to a file?

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed

None