Home Forums Porto Admin Template Advanced Tables (Basic Table with Tools)

This topic contains 5 replies, has 3 voices, and was last updated by  Support2 1 week, 1 day ago. This post has been viewed 82 times

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #10023442

    Eric
    Participant

    Advanced Tables (Basic Table with Tools)

    Hi Jonas,

    Export to PDF, EXCEL, etc not working. Flash is on/allowed and the old BS3 admin version is working fine.

    Your demo is also failing to export. http://preview.oklerthemes.com/porto-admin/2.0.0/tables-advanced.html

    I have tried this on 4 browsers. The export buttons work with the previous admin version just fine. But on the same browsers, fail to export from the new version.

    Can you help please.

    Thank you!



    Template Version: New Bootstrap 4 version
    #10023461

    Support
    Keymaster

    Hello, really sorry about that issue, we have made some tests and fixed the problem.

    Please download the latest version on ThemeForest and let me know if the problem persists.

    We also updated the preview (clear cache before test): http://preview.oklerthemes.com/porto-admin/2.0.0/tables-advanced.html

    Best Regards,

    Jonas


    #10023463

    Eric
    Participant

    Thank you Jonas

    Can you tell me specifically which files or folders I should update? I’d only like to overwrite the necessary files on my server if possible.

    thank you!


    #10023465

    Support
    Keymaster

    Hi,

    Files:
    – examples.datatables.tabletools.js
    – vendor/datatables (you need to update the HTML to get the correct files are well)

    Let me know if the problem persists,

    Kind Regards,

    Jonas


    #10023466

    Eric
    Participant

    Hi Jonas,

    I did this and it seems to be working great! Thank you!

    2 more things:

    1. your line has en extra slash before jszip: /JSZip-2.5.0//jszip.min.js

    2. One more question:
    In my advanced table with tools. I have numbers like 6,500 in a column (formatted numbers with comma). To be able to find these rows using the search, I have a hidden column without the comma (6500) so the user can type in “6500” in the search and find the correct rows without entering the comma. I want to hide these hidden columns on export to PDF and EXCEL but I am having problems figuring out the buttons.exportData(). Can you tell me how I can hide these hidden columns on PDF, Print and Excel export?


    #10023471

    Support2
    Keymaster

    Hello,

    1) Thanks for let us know about that. We already fixed it now.

    2) To choose what columns you want to export with tools, please change the code in (js/examples/examples.datatables.tabletools.js) to:

    .
    ..
    ...
    ....
    var table = $table.dataTable({
    	sDom: '<"text-right mb-md"T><"row"<"col-lg-6"l><"col-lg-6"f>><"table-responsive"t>p',
    	buttons: [
    		{
    			extend: 'print',
    			exportOptions: {
                    columns: [1,2]
                }
    		},
    		{
    			extend: 'pdf',
    			exportOptions: {
                    columns: [1,2]
                }
    		},
    		{
    			extend: 'excel',
    			exportOptions: {
                    columns: [1,2]
                }
    		}
    	]
    });
    ....
    ...
    ..
    .

    * Note that changed the “buttons” object and added the option “exportOptions”. You can set in “columns” what columns you want to export.

    Please, try that and let me know if you need further assistance.

    Kind Regards,

    Rodrigo.


Viewing 6 posts - 1 through 6 (of 6 total)