reportService = $reportService; $this->exportService = $exportService; } public function loadReportData(): void { $reportDTO = $this->reportService->buildAccountBalanceReport($this->startDate, $this->endDate); $options = array_fill_keys($this->options, true); $this->accountBalanceReport = new AccountBalanceReportTransformer($reportDTO, $options); } public function form(Form $form): Form { return $form ->inlineLabel() ->schema([ Split::make([ $this->getDateRangeFormComponent(), Cluster::make([ $this->getStartDateFormComponent(), $this->getEndDateFormComponent(), ]) ->hiddenLabel(), ])->live(), CheckboxList::make('options') ->options([ 'showAccountCode' => 'Show Account Code', 'showZeroBalances' => 'Show Zero Balances', ]) ->columns(2), ]); } public function exportCSV(): StreamedResponse { return $this->exportService->exportToCsv($this->company, $this->accountBalanceReport, $this->startDate, $this->endDate); } public function exportPDF(): StreamedResponse { return $this->exportService->exportToPdf($this->company, $this->accountBalanceReport, $this->startDate, $this->endDate); } }