Custom PO Print format

I have created new print format for PO. It is working properly and fetching all data on my local installation having CentOS 7 but not on an instance on digital ocean having Ubuntu. It is not displaying any data from the tables, only HTML data like Headings and Labels are getting displayed and all other data from PO, PO Items is blank.Here is the code…

Can someone please help me in understanding what is wrong here. Thanks in advance.

Please use server side formats. Client side is only for backward compatibility.

So sir we need to change code also…? if yes so please give me a example code…!

                          Thanx in advance