Want to add dynamic footer into datatable.

Want to add dynamic footer into datatable.

krishanu_debnathkrishanu_debnath Posts: 18Questions: 1Answers: 0

How can I add dynamic footer into datatable.
Example:-
I want to add Created By and Created Date into the Excel and Pdf.
Is there any possible way to do that

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 20,276Questions: 26Answers: 4,765
    Answer ✓

    I believe the tfoot needs to be in the DOM when Datatables initializes for Datatables to know there is a footer and include it in the export. See this example that shows how to configure footer export with the buttons.

    Kevin

  • krishanu_debnathkrishanu_debnath Posts: 18Questions: 1Answers: 0

    Actually I was looking for messageTop & messageBottom.

    {
    extend: 'excelHtml5',
    title: 'Title '+month+'-'+year,
    messageTop:'Test Top',
    messageBottom: '\n This is system generated report on '+current_date,
    text: '<i class="fa fa-file-excel-o"></i> Export Excel',
    titleAttr: 'Excel'
    }

  • krishanu_debnathkrishanu_debnath Posts: 18Questions: 1Answers: 0

    @kthorngren ... please check this example.. https://datatables.net/examples/ajax/objects.html

    If I want to print salary along with '.00' what to do. example.. in fisrt row of example's result is 162,700 but i want to print 162,700.00

Sign In or Register to comment.