diff --git a/src/app/Services/Contracts/JasperServerRequestServiceContract.php b/src/app/Services/Contracts/JasperServerRequestServiceContract.php index 8884e1a..38e30b6 100644 --- a/src/app/Services/Contracts/JasperServerRequestServiceContract.php +++ b/src/app/Services/Contracts/JasperServerRequestServiceContract.php @@ -85,13 +85,13 @@ interface JasperServerRequestServiceContract public function call(string $uri): JasperServerRequestService; /** - * @return string + * @return void */ - public function inline(): string; + public function inline(): void; /** * @param string|null $filename - * @return string + * @return void */ - public function download(?string $filename): string; + public function download(?string $filename): void; } diff --git a/src/app/Services/JasperServerRequestService.php b/src/app/Services/JasperServerRequestService.php index d7120b6..bc784f2 100644 --- a/src/app/Services/JasperServerRequestService.php +++ b/src/app/Services/JasperServerRequestService.php @@ -230,26 +230,27 @@ class JasperServerRequestService implements JasperServerRequestServiceContract } /** - * @return string + * @return void */ - public function inline(): string + public function inline(): void { $this->setContentDisposition(ContentDispositionEnum::INLINE); - return $this->getReport(); + $this->setHeader($this->report); + echo $this->getReport(); } /** * @param string|null $filename - * @return string + * @return void */ - public function download(?string $filename): string + public function download(?string $filename): void { if (in_array($this->format, ReportFormatEnum::downloadable())) { $this->setContentDisposition(ContentDispositionEnum::ATTACHMENT); $this->setHeader($this->report, $filename); } - return $this->getReport(); + echo $this->getReport(); } /**