KoolReport's Forum

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

Multiple custom headers with images #3241

Open EmaPromenna opened this topic on on Feb 8 - 5 comments

EmaPromenna commented on Feb 8

We need your guidance for adding multiple headers with images. Right now we are adding images in to the header for very first row, we need to add another dynamic header with images in the xlsx after some dynamic rows.

Sebastian Morales commented on Feb 15

Would you pls describe the problem more specifically, with an example if possible? Tks,

EmaPromenna commented on Feb 15

Dear Sebastian, We are using Koolreport to export our application data, We are unable to add a multiple headers with images for xlsx. Please find details example as below:

Consider Row 1 as Header 1 and Row n+1 as Header 2
Row 1 - Group 1 image - 
Row 2 - Group 1 data
Row 3 - Group 1 data
Row n - Group 1 data
Row n+1 - Group 2 image
Row n+2 - Group 2 data

Request you to review and guide us.

Thanks and regards, Ema

Sebastian Morales commented on Feb 16

I think our Excel package has not supported inserting images yet. You can group table headers in exported excel file though:

https://www.koolreport.com/examples/reports/excel/table_complex_header/

EmaPromenna commented on Feb 16

Dear Sebastian, We are already inserting images using below function: public function drawings()

{
    $drawing = new Drawing();
    $drawing->setName('Logo');
    $drawing->setDescription('This is my logo');
    $drawing->setPath(public_path('/images/group1_logo_left.png'));
    $drawing->setHeight(50);
    $drawing->setWidth(100);
    $drawing->setCoordinates('A1');
    $drawing->setOffsetY(10);

    $drawing1 = new Drawing();
    $drawing1->setName('Logo');
    $drawing1->setDescription('This is my logo');
    $drawing1->setPath(public_path('/images/group1_logo_right.png'));
    $drawing1->setHeight(50);
    $drawing1->setWidth(100);
    $drawing1->setCoordinates('J1');
    $drawing1->setOffsetX(02);
    $drawing1->setOffsetY(20);

    return [$drawing, $drawing1];
}

We need to apply same for new header 2 after group 1 data rows.

Request you to review and let us know.

Thanks and regards, EMA

Sebastian Morales commented on Feb 19

Would you mind posting your full excel table create code?

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
None yet

None