Pdf print server side variable

Pdf print server side variable

stevasteva Posts: 1Questions: 1Answers: 0

Hello,
Can I print current username to the top of my pdf report? I think I have to use Ajax function to call server side function which return username.
Thanks

Answers

  • rf1234rf1234 Posts: 2,996Questions: 87Answers: 421
    edited February 2023

    You could use "messageTop".
    https://datatables.net/reference/button/print

    In the link above it is used with "print". I use it with "excel" but you should also be able to use it with "pdf".

    Here is an example from my own coding:

    I think I have to use Ajax function to call server side function which return username.

    Well, if you don't have it you will need to retrieve it from the server.

Sign In or Register to comment.