Get row selected summary on print

Get row selected summary on print

LapointeLapointe Posts: 430Questions: 81Answers: 4

Hi

I try to get summary on print using

{
                        extend:'print',
                        text: 'Imprimer',
                        exportOptions: {
                            columns: ':visible',
                            title: 'Données en date du '+GetDateFr(),
                            messageBottom: GetAmountSelected()
                        }
                    },

but GetAmountSelected() is executed at button show, not at button click....

Perhaps using not extend but onclick and then call print with computed values ?

If somebody did it...

Thanks

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,174Questions: 26Answers: 4,923
    Answer ✓

    This example shows how to use the title and messages as functions. First problem is you have both title and messageBottom inside the exportOptions setting. They don't go there and should be at the same level as extend. Second is you probably will need to do something like this:

            messageBottom: function () {
              return GetAmountSelected();
            },
    

    Kevin

  • LapointeLapointe Posts: 430Questions: 81Answers: 4

    Hi @kevin

    Yes of course..

    And msimatch placing... must not be in exportOptions:.

    Thanks
    Bob

This discussion has been closed.