GithubHelp home page GithubHelp logo

jimmy-js / laravel-report-generator Goto Github PK

View Code? Open in Web Editor NEW
566.0 19.0 151.0 361 KB

Rapidly Generate Simple Pdf, CSV, & Excel Report Package on Laravel

Home Page: https://packagist.org/packages/jimmyjs/laravel-report-generator

License: MIT License

PHP 32.30% Blade 67.70%
laravel pdf excel report pdf-report excelgenerator csv

laravel-report-generator's Introduction

Laravel Report Generators (PDF, CSV & Excel)

Rapidly Generate Simple Pdf Report on Laravel (Using barryvdh/laravel-dompdf or barryvdh/laravel-snappy) or CSV / Excel Report (using Maatwebsite/Laravel-Excel)

This package provides a simple pdf, csv & excel report generators to speed up your workflow. It also allows you to stream(), download(), or store() the report seamlessly.

Version

Version Laravel Version Php Version Maatwebsite/Excel Ver Feature
1.0 <= 5.6 <=7.0 ~2.1.0 using chunk() to handle big data
1.1 <= 5.6 <=7.0 ~2.1.0 using cursor() to handle big data
2.0 >= 5.5 ^7.0 ^3.1 Using new version of maatwebsite (v3.1)

Find the comparison between chunk and cursor in here

Installation

Add package to your composer:

composer require jimmyjs/laravel-report-generator

If you are running Laravel > 5.5 that's all you need to do. If you are using Laravel < 5.5 add the ServiceProvider to the providers array in config/app.php

Jimmyjs\ReportGenerator\ServiceProvider::class,

Optionally, you can add this to your aliases array in config/app.php

'PdfReport' => Jimmyjs\ReportGenerator\Facades\PdfReportFacade::class,
'ExcelReport' => Jimmyjs\ReportGenerator\Facades\ExcelReportFacade::class,
'CSVReport' => Jimmyjs\ReportGenerator\Facades\CSVReportFacade::class,

Optionally, You can publish the config file (then it will be available in config/report-generator.php)

php artisan vendor:publish --provider="Jimmyjs\ReportGenerator\ServiceProvider"

If you want to generate a pdf report, please install either dompdf / snappy pdf. This package will automatically use snappy pdf. If you want to use dompdf then please change config/report-generator.php:

return [
    'flush' => false,
    'pdfLibrary' => 'dompdf'
];

For better speed on generating pdf report, I recommend you to use laravel snappy package. To using laravel snappy, you should install wkhtmltopdf to work with this package (Jump to wkhtmltopdf installation)

Example Display PDF Code

use PdfReport;

public function displayReport(Request $request)
{
    $fromDate = $request->input('from_date');
    $toDate = $request->input('to_date');
    $sortBy = $request->input('sort_by');

    $title = 'Registered User Report'; // Report title

    $meta = [ // For displaying filters description on header
        'Registered on' => $fromDate . ' To ' . $toDate,
        'Sort By' => $sortBy
    ];

    $queryBuilder = User::select(['name', 'balance', 'registered_at']) // Do some querying..
                        ->whereBetween('registered_at', [$fromDate, $toDate])
                        ->orderBy($sortBy);

    $columns = [ // Set Column to be displayed
        'Name' => 'name',
        'Registered At', // if no column_name specified, this will automatically seach for snake_case of column name (will be registered_at) column from query result
        'Total Balance' => 'balance',
        'Status' => function($result) { // You can do if statement or any action do you want inside this closure
            return ($result->balance > 100000) ? 'Rich Man' : 'Normal Guy';
        }
    ];

    // Generate Report with flexibility to manipulate column class even manipulate column value (using Carbon, etc).
    return PdfReport::of($title, $meta, $queryBuilder, $columns)
                    ->editColumn('Registered At', [ // Change column class or manipulate its data for displaying to report
                        'displayAs' => function($result) {
                            return $result->registered_at->format('d M Y');
                        },
                        'class' => 'left'
                    ])
                    ->editColumns(['Total Balance', 'Status'], [ // Mass edit column
                        'class' => 'right bold'
                    ])
                    ->showTotal([ // Used to sum all value on specified column on the last table (except using groupBy method). 'point' is a type for displaying total with a thousand separator
                        'Total Balance' => 'point' // if you want to show dollar sign ($) then use 'Total Balance' => '$'
                    ])
                    ->limit(20) // Limit record to be showed
                    ->stream(); // other available method: store('path/to/file.pdf') to save to disk, download('filename') to download pdf / make() that will producing DomPDF / SnappyPdf instance so you could do any other DomPDF / snappyPdf method such as stream() or download()
}

Note: For downloading to excel / CSV, just change PdfReport facade to ExcelReport / CSVReport facade with no more modifications

Data Manipulation

$columns = [
    'Name' => 'name',
    'Registered At' => 'registered_at',
    'Total Balance' => 'balance',
    'Status' => function($customer) { // You can do data manipulation, if statement or any action do you want inside this closure
        return ($customer->balance > 100000) ? 'Rich Man' : 'Normal Guy';
    }
];

Will produce a same result with:

$columns = [
    'Name' => function($customer) {
        return $customer->name;
    },
    'Registered At' => function($customer) {
        return $customer->registered_at;
    },
    'Total Balance' => function($customer) {
        return $customer->balance;
    },
    'Status' => function($customer) { // You can do if statement or any action do you want inside this closure
        return ($customer->balance > 100000) ? 'Rich Man' : 'Normal Guy';
    }
];

Report Output

Report Output with Grand Total

With this manipulation, you could do some eager loading relation like:

$post = Post::with('comments')->where('active', 1);

$columns = [
    'Post Title' => function($post) {
        return $post->title;
    },
    'Slug' => 'slug',
    'Latest Comment' => function($post) {
        return $post->comments->first()->body;
    }
];

Example Code With Group By

Or, you can total all records by group using groupBy method

    ...
    // Do some querying..
    $queryBuilder = User::select(['name', 'balance', 'registered_at'])
                        ->whereBetween('registered_at', [$fromDate, $toDate])
                        ->orderBy('registered_at', 'ASC'); // You should sort groupBy column to use groupBy() Method

    $columns = [ // Set Column to be displayed
        'Registered At' => 'registered_at',
        'Name' => 'name',
        'Total Balance' => 'balance',
        'Status' => function($result) { // You can do if statement or any action do you want inside this closure
            return ($result->balance > 100000) ? 'Rich Man' : 'Normal Guy';
        }
    ];

    return PdfReport::of($title, $meta, $queryBuilder, $columns)
                    ->editColumn('Registered At', [
                        'displayAs' => function($result) {
                            return $result->registered_at->format('d M Y');
                        }
                    ])
                    ->editColumn('Total Balance', [
                        'class' => 'right bold',
                        'displayAs' => function($result) {
                            return thousandSeparator($result->balance);
                        }
                    ])
                    ->editColumn('Status', [
                        'class' => 'right bold',
                    ])
                    ->groupBy('Registered At') // Show total of value on specific group. Used with showTotal() enabled.
                    ->showTotal([
                        'Total Balance' => 'point'
                    ])
                    ->stream();

PLEASE TAKE NOTE TO SORT GROUPBY COLUMN VIA QUERY FIRST TO USE THIS GROUP BY METHOD.

Output Report With Group By Registered At

Output Report with Group By Grand Total

Wkhtmltopdf Installation

  • Download wkhtmltopdf from https://wkhtmltopdf.org/downloads.html
  • Change your snappy config located in /config/snappy.php (run php artisan vendor:publish if snappy.php file is not created) to:
    'pdf' => array(
        'enabled' => true,
        'binary'  => '/usr/local/bin/wkhtmltopdf', // Or specified your custom wkhtmltopdf path
        'timeout' => false,
        'options' => array(),
        'env'     => array(),
    ),

Other Method

1. setPaper($paper = 'a4')

Supported Media Type: PDF

Description: Set Paper Size

Params:

  • $paper (Default: 'a4')

Usage:

PdfReport::of($title, $meta, $queryBuilder, $columns)
         ->setPaper('a6')
         ->make();

2. setCss(Array $styles)

Supported Media Type: PDF, Excel

Description: Set a new custom styles with given selector and style to apply

Params:

  • Array $styles (Key: $selector, Value: $style)

Usage:

ExcelReport::of($title, $meta, $queryBuilder, $columns)
            ->editColumn('Registered At', [
                'class' => 'right bolder italic-red'
            ])
            ->setCss([
                '.bolder' => 'font-weight: 800;',
                '.italic-red' => 'color: red;font-style: italic;'
            ])
            ->make();

3. setOrientation($orientation = 'portrait')

Supported Media Type: PDF

Description: Set Orientation to Landscape or Portrait

Params:

  • $orientation (Default: 'portrait')

Usage:

PdfReport::of($title, $meta, $queryBuilder, $columns)
         ->setOrientation('landscape')
         ->make();

4. withoutManipulation()

Supported Media Type: PDF, Excel, CSV

Description: Faster generating report, but all columns properties must be matched the selected column from SQL Queries

Usage:

$queryBuilder = Customer::select(['name', 'age'])->get();
$columns = ['Name', 'Age'];
PdfReport::of($title, $meta, $queryBuilder, $columns)
         ->withoutManipulation()
         ->make();

5. showMeta($value = true)

Supported Media Type: PDF, Excel, CSV

Description: Show / hide meta attribute on report

Params:

  • $value (Default: true)

Usage:

PdfReport::of($title, $meta, $queryBuilder, $columns)
         ->showMeta(false) // Hide meta
         ->make();

6. showHeader($value = true)

Supported Media Type: PDF, Excel, CSV

Description: Show / hide column header on report

Params:

  • $value (Default: true)

Usage:

PdfReport::of($title, $meta, $queryBuilder, $columns)
         ->showHeader(false) // Hide column header
         ->make();

7. showNumColumn($value = true)

Supported Media Type: PDF, Excel, CSV

Description: Show / hide number column on report

Params:

  • $value (Default: true)

Usage:

PdfReport::of($title, $meta, $queryBuilder, $columns)
         ->showNumColumn(false) // Hide number column
         ->make();

8. simple()

Supported Media Type: Excel

Description: Generate excel in simple mode (no styling on generated excel report, but faster in generating report)

Params:

  • None

Usage:

ExcelReport::of($title, $meta, $queryBuilder, $columns)
         ->simple()
         ->download('filename');

laravel-report-generator's People

Contributors

alvaro-canepa avatar bgarrison25 avatar jimmy-js avatar kaptk2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-report-generator's Issues

Date Printed on PDF only prints UTC time stamp

I didn't see any way to pass in the timezone to the <script> section of the general-pdf-template blade view. I tried a few things, but was unsuccessful.

In the end, I wound up forking the repo and just removed that line altogether.

Would be nice if we could get a setTimeZone() method on the ReportGenerator class.

maatwebsite/excel 3.0

I have "maatwebsite/excel": "^3.0", so...

composer require jimmyjs/laravel-report-generator

Using version ^1.0 for jimmyjs/laravel-report-generator
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for maatwebsite/excel (locked at 3.0.6, required as ^3.0) -> satisfiable by maatwebsite/excel[3.0.6].
- jimmyjs/laravel-report-generator 1.0.0 requires maatwebsite/excel ~2.1.0 -> satisfiable by maatwebsite/excel[2.1.x-dev].
- jimmyjs/laravel-report-generator 1.0.1 requires maatwebsite/excel ~2.1.0 -> satisfiable by maatwebsite/excel[2.1.x-dev].
- jimmyjs/laravel-report-generator 1.0.10 requires maatwebsite/excel ~2.1.0 -> satisfiable by maatwebsite/excel[2.1.x-dev].
- jimmyjs/laravel-report-generator 1.0.11 requires maatwebsite/excel ~2.1.0 -> satisfiable by maatwebsite/excel[2.1.x-dev].
- jimmyjs/laravel-report-generator 1.0.12 requires maatwebsite/excel ~2.1.0 -> satisfiable by maatwebsite/excel[2.1.x-dev].
- jimmyjs/laravel-report-generator 1.0.13 requires maatwebsite/excel ~2.1.0 -> satisfiable by maatwebsite/excel[2.1.x-dev].
- jimmyjs/laravel-report-generator 1.0.14 requires maatwebsite/excel ~2.1.0 -> satisfiable by maatwebsite/excel[2.1.x-dev].
- jimmyjs/laravel-report-generator 1.0.15 requires maatwebsite/excel ~2.1.0 -> satisfiable by maatwebsite/excel[2.1.x-dev].
- jimmyjs/laravel-report-generator 1.0.16 requires maatwebsite/excel ~2.1.0 -> satisfiable by maatwebsite/excel[2.1.x-dev].
- jimmyjs/laravel-report-generator 1.0.17 requires maatwebsite/excel ~2.1.0 -> satisfiable by maatwebsite/excel[2.1.x-dev].
- jimmyjs/laravel-report-generator 1.0.18 requires maatwebsite/excel ~2.1.0 -> satisfiable by maatwebsite/excel[2.1.x-dev].
- jimmyjs/laravel-report-generator 1.0.2 requires maatwebsite/excel ~2.1.0 -> satisfiable by maatwebsite/excel[2.1.x-dev].
- jimmyjs/laravel-report-generator 1.0.3 requires maatwebsite/excel ~2.1.0 -> satisfiable by maatwebsite/excel[2.1.x-dev].
- jimmyjs/laravel-report-generator 1.0.4 requires maatwebsite/excel ~2.1.0 -> satisfiable by maatwebsite/excel[2.1.x-dev].
- jimmyjs/laravel-report-generator 1.0.5 requires maatwebsite/excel ~2.1.0 -> satisfiable by maatwebsite/excel[2.1.x-dev].
- jimmyjs/laravel-report-generator 1.0.6 requires maatwebsite/excel ~2.1.0 -> satisfiable by maatwebsite/excel[2.1.x-dev].
- jimmyjs/laravel-report-generator 1.0.7 requires maatwebsite/excel ~2.1.0 -> satisfiable by maatwebsite/excel[2.1.x-dev].
- jimmyjs/laravel-report-generator 1.0.8 requires maatwebsite/excel ~2.1.0 -> satisfiable by maatwebsite/excel[2.1.x-dev].
- jimmyjs/laravel-report-generator 1.0.9 requires maatwebsite/excel ~2.1.0 -> satisfiable by maatwebsite/excel[2.1.x-dev].
- Conclusion: don't install maatwebsite/excel 2.1.x-dev
- Installation request for jimmyjs/laravel-report-generator ^1.0 -> satisfiable by jimmyjs/laravel-report-generator[1.0.0, 1.0.1, 1.0.10, 1.0.11, 1.0.12, 1.0.13, 1.0.14, 1.0.15, 1.0.16, 1.0.17, 1.0.18, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9].

Installation failed, reverting ./composer.json to its original content.

CSV Report adds number column without header, causing wrong header order

In CSV Report generation, no. column header is not being added but number is added in value, this causes wrong header order. Ex.

my_column_1 my_column_2 my_column_3 my_column_4
auto_added_no my_val_1 my_val_2 my_val_3 my_val_4

Is this expected behavior?

Also we can't use showNumColumn in CSV to prevent this

PhpExcell

Having this error when intalling the package
Package phpoffice/phpexcel is abandoned, you should avoid using it. Use phpoffice/phpspreadsheet instead.

I'm try like this, but i can't get pdf report.

public function report(){
    $title = 'Registered User Report';

    $meta = [
        'Registered on To ',
        'Sort By'
    ];

    $queryBuilder = User::select(['emp_code', 'first_name', 'middle_name', 'last_name']);

    $columns = [
        'EMP Code' => 'emp_code',
        'First Name' => 'first_name',
        'Middle Name' => 'middle_name',
        'Last Name' => 'last_name'
    ];

    return PdfReport::of($title, $meta, $queryBuilder, $columns)
        ->limit(20)
        ->stream();
}

capture

[Feature] Option to hide the title

It would be nice to have an option to hide the title on the excel sheet or pdf.

Currently it is only possible to hide the title by commenting/deleting the respective row in the published views, but if we use simple() method of ExcelReport, the title is still printed.

Need create a variation to Laravel 5.1

The helper resource_path was added in the project, but it don't exists in laravel 5.1.
I need a branch specific to Laravel 5.1, with de alteration in ServiceProvider.php line 52

from
__DIR__.'/views' => resource_path('views/vendor/laravel-report-generator')

to
__DIR__.'/views' => base_path('resources/views/vendor/laravel-report-generator')

Hiding the no column breaks the table width

When you cast showNumColumn(false) on your PdfReport, it breaks the table's total width, is there a way to fix this?

Example without No (I'm trying to use the ID of my report to replace it)
image

Example with No
image

Trying to make it work but report won't show any fields

Hi, I'm trying to make this work via an addon with PyroCMS. I almost copied the example code word per word, expect for the query where instead of using the model, I used "DB::Table.

The query does hold values from the database but it does not display on the PDF
image

Here's what I''m getting:

image

Here's the code:

public function displayReport(Request $request)
{
$fromDate = '2018-11-23';
$toDate = '2018-11-25';
$sortBy ='name';

    $title = 'Account Balance Report'; // Report title

    $meta = [ // For displaying filters description on header
        'Registered on' => $fromDate . ' To ' . $toDate,
        'Sort By' => $sortBy
    ];

    $queryBuilder = DB::table('testreport_accountinfo_translations')->select('name', 'created_at as registered_at', 'balance')->wherebetween('created_at', [$fromDate, $toDate])->orderBy($sortBy)->get(); 
    dd($queryBuilder);
    $columns = [ // Set Column to be displayed
        'Name' => 'name',
        'Registered At' => 'registered_at',
        'Total Balance' => 'balance',
    ];
    
    // Generate Report with flexibility to manipulate column class even manipulate column value (using Carbon, etc).
    return PDFReport::of($title, $meta, $queryBuilder, $columns)
        ->setpaper('legal')
        ->setorientation('landscape')
        ->editColumn('Registered At', [ // Change column class or manipulate its data for displaying to report
            'displayAs' => function($result) {
                return $result->registered_at->format('d M Y');
            },
            'class' => 'left'
        ])
        ->editColumns(['Total Balance', 'Status'], [ // Mass edit column
            'class' => 'right bold'
        ])
        ->showTotal([ // Used to sum all value on specified column on the last table (except using groupBy method). 'point' is a type for displaying total with a thousand separator
            'Total Balance' => 'point' // if you want to show dollar sign ($) then use 'Total Balance' => '$'
        ])
        ->stream(); // or download('filename here..') to download pdf
}

Generating a report with Ajax

Can I generate a report with an Ajax request?
I'm using JQuery's ajax method to pass the data to my controller, it gets to the server but the response is odd, is there a way to generate the report in a pop-up window o a blank window?

ERR_INVALID_RESPONSE excel download

hello i have an issue downloading excel when theres alot of rows seleccted , but when theres not a lot of rows selected its download fine .
i got this error on chrome ERR_INVALID_RESPONSE
but when i download it from my local it worked :(
any help ?

Call to a member function cursor() on null

Hi. I added this package to my project. But when I run the program, it has this error:
Error
Call to a member function cursor() on null (View: C:\xampp\htdocs\qatest2\vendor\jimmyjs\laravel-report-generator\src\views\general-pdf-template.blade.php)

here's the code to my controller:

`public function filterReport(Request $request)
{
$school = $request->select1;
$accredStatus = $request->accredStatus;

     $title = 'Accreditation Report';
    $meta = [ 
            'School' => $school,
            'Sort By' => $accredStatus
        ];

     $queryBuilder = DB::table('prgrm_accreds')
                    ->join('acad_prgrms', 'acad_prgrms.id', 'prgrm_accreds.acad_prgrm_id')
                    ->join('schools', 'schools.id', 'acad_prgrms.school_id')
                    ->where('schools.school_name', $school)
                    ->where('accred_stats.accred_status', $accredStatus)
                    ->where('current', 'yes')
                    ->get();

     return PdfReport::of($title, $meta, $queryBuilder, $columns)
                ->limit(20) 
                ->stream();

}`

No PDF is Download

I implemented all the readme procedures but while i run the report no file was downloaded with stream().

Error: Illegal offset type

Hi

Laravel return this error: Illegal offset type

This is my page:

`...

    $fromDate = $request->input('rm_dt_inicio');
    $toDate   = $request->input('rm_dt_fim');

    // Report title
    $title = 'Relatório de Monitoramento';

    // For displaying filters description on header
    $meta = [
        'Registrados em' => $fromDate . ' To ' . $toDate
    ];

    // Do some querying..
    $queryBuilder = \App\Entidade::get();

    // Set Column to be displayed
    $columns = [
        'Nome' => 'ent_nome',
        'Nome do Display' => 'ent_nome',
        'Data de Cadastro' => 'ent_nome'
    ];

    return PdfReport::of($title, $meta, $queryBuilder, $columns)
        ->editColumn(['Nome', 'Nome do Display', 'Data de Cadastro'], [
            'class' => 'right bold'
        ])
        ->setPaper('a4')
        ->limit(20)
        ->download('teste.pdf');

...`

Title Logo

How to add a logo in the PDF report generator?

Undefined variable: showNumColumn

Hey all,

this issue suddenly appeared today, last week all worked fine. Whenever I want to run the PdfReport or ExcelReport, I get the exception "Undefined variable: showNumColumn".

After that, I tried to use PdfReport::showNumColumn(0)->of(...) but that did not help as well... Any idea? I don't need the num column, so any hack to quickly resolve this issue would be appreciated... Seems like the blades for PDF/Excel don't recognize this variable, for whatever reason...

@bgarrison25 Any idea why this is going wrong? Thanks in advance!

No support in Laravel Lumen

el archivo "ServiceProvider.php" esta dando problemas al momento de usar la biblioteca en laravel lumen, es posible que le puedas dar soporte para que funcione en dicho framework??

Por el momento pude solucionar el error con el siguiente linea de codigo

public function boot()
{
$this->loadViewsFrom(DIR . '/views', 'report-generator-view');

    if (! $this->isLumen()) {
        $this->publishes([
            __DIR__.'/../config/report-generator.php' => config_path('report-generator.php')
        ], 'laravel-report:config');
    }
    

    $this->publishes([
        __DIR__.'/views' => resource_path('views/vendor/jimmyjs'),
    ], 'laravel-report:view-template');
}

Report Generator did not install

I got the following error trying to install:
"Your requirements could not be resolved to an installable set of packages"
"Problem 1

  • Conclusion: remove Laravel/Framewokr v5.8.17
  • Conclusion: don't install Laravel/framework v5.8.17"
    Isnt framework the base of laravel?

[Feature] Export Report as JSON

Hi, do you know any way to export the report as JSON?

I know I can use the get method on the collection but I would like to have the same parsing / header as the PDF document.

I Added an option to save file to disk, check the code on the description

Hi,
I add the option to export file to disk using the following code, the following example was created on the ExcelReport Class
this also can support custom disk.

public function storeFile($filename,$location=null,$customDisk=null){
$path=$location !=null ? $localtion."/": "";
$export = $this->make();
return Excel::store($export,$path."{$filename}.{$this->format}",$customDisk);
}
i hope you can added it .

How to generate report for parent child relationship

Hello,

I have two tables:

  1. Parent table - Having parentId, parentName, parentGender
  2. Child table - Having childid, parentid, childname, child gender, childbirthdate

I want to generate report something like

Parent Name, Parent Gender
Child Name, Child Date of Birth, Child Gender

Now e.g.
Parent table has 2 records:

  1. Tom, Male
  2. Jerry, Female

Child table has 3 records.

  1. Parent Id - 1, Child Name - Bob, Child Gender - Male, DOB - 20thFeb2016
  2. Parent Id - 1, Child Name - Tos, Child Gender - Female, DOB - 14Jan2014
  3. Parent Id - 2, Child Name - Mary, Child Gender - Female, DOB - 17Sept2017

How to generate such report where single parent can have 2 child rows after that another parent has 1 child row etc.

Please advise.

Possbile to add ->save() or ->store() on all 3 reports?

I am looking a easier way to store files locally on the server, not downloading or streaming. What I am trying to do is setting a scheduling service, auto creating reports and leaving them on server for user to download, or email them the report.

I know for ExcelReport you can make() then store() the LaravelExcelWriter object,
and for CSV you can set path in Writer::createFromPath then store all data by using insertAll().

Do you think you can create something like store() that can store file on server for all 3 reports PdfReport, ExcelReport and CSVReport?

display none for column?

it is possible without css manipulation in the main template? maybe Edit Column but what I must set? display none didn't help

Compatibility with Maatwebsite excel 3.0

Hi, I would like to use Maatwebsite Excel 3.0 and report generator but report generator requires 2.1.* and I am not able to use thge package. Will this be compatible with Excel 3.0?

Eloquent name brings error

I have tried to print the report that has relationships.How can I display a name a name in the relationship. I am using Eloquent in Laravel

Published view not working

I published a the PDF response view and customized it, but when I generate the report, it shows the default view, do I have to change anything after publishing the package?

Facades Not Working

Can you please tell us how to use the Facades?
I always get the Error for Non-static methods should not be called from a static context

Displaying page #

How can we display page # (running) for report. Please let me know the syntax for the same.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.