I am having difficulty in the displaying the data from the database on the screen. I would like to display the data in reverse order, as shown in the attachment.
Can anyone help?
You want to show the records horizontally, instead of vertically, based on your diagram, not reverse order which would be easy.  This goes against most design pattens.  It looks like you are trying to create a dynamic header of some sort.  It's unlikely that you would need that as the Outsystems widgets that show lists of records will create the headers for you.

If you really, really need this please describe the use case a little better.  In other words, why is the Outsystems capabilitiy not good enough for this?