Export Buttons

Export Buttons

jmorejmore Posts: 19Questions: 4Answers: 1

I am using the following buttons definition to provide export options.

     "buttons" :
       [
          'colvis',
         {
           extend: 'collection',
           text: 'Export',
           buttons:
           [
             {
               extend: 'print',
               exportOptions: {
                 columns: [ ':visible' ]
               }
             },
             {
               extend: 'copyHtml5',

               exportOptions: {
                 columns: [ ':visible' ]
               }
             },
             {
               extend: 'csvHtml5',
               exportOptions: {
                 columns: [ ':visible' ]
                }
             },
             {
               extend: 'pdfHtml5',
               exportOptions: {
                columns: [ ':visible' ]
               }
             }
           ]
         }
       ]

I have 19 columns in the table and a variable number of rows. When I select the print button all of the data appears on the output page but the header does not adhere to the page size. The header appears every 13 rows. When I hide a single column the behavior is exactly the same except, as expected; the hidden column is not included in the output. However; if I hide 2 columns the result output only includes 9 columns instead of the expected 17. And the header row does adhere to the page size even if the layout or page size is changed.

If I use the copy or csv button the behavior is as expected and the 17 columns are present in the output and using the pdf button evokes the same behavior as the copy button. This leads me to believe that the formatting (particularly page sizing) is a problem.

I have looked at some of the examples and end up at points that I just do not understand or cannot determine how to apply. If there is an obvious problem in my use that someone can point to I really appreciate the assistance.

John

Answers

  • allanallan Posts: 61,805Questions: 1Answers: 10,119 Site admin

    Can you give a link to the page please?

    Allan

  • jmorejmore Posts: 19Questions: 4Answers: 1

    Allan,
    You can access the page here https://tmtest.dyndns.org:10010/ (have to ignore no cert)
    Sign In with
    user - datatables
    password - 1234

    Select Printers button
    A search criteria screen will appear where you can then select the Get The Device List button.

    Table should appear and this is where the problem exists.
    I have been doing some testing on Chrome and Firefox. Seems to work correctly on Firefox 50.1.0 but not Chrome Version 55.0.2883.87 (64-bit). Both on Linux

    I appreciate your help.

    John

  • jmorejmore Posts: 19Questions: 4Answers: 1

    Allan,
    Sorry for any wasted time. For some reason my DDNS service was not working. You can access the site at tmtest.dlinkddns.com:10010

This discussion has been closed.