>Can you suggest any 3rd party software I can use to
>format the output of the database query.
Foxfire and other 3rd party query tools are having it now. You can also built a function of yourself. This is what I do in most of my applications. As for fetching the data, you will probably want to simulate client server techniques. If you access X-Works site, you'll see a few comments on a small technique I use to fetch data.
>Using x-works, do I have to write this logic myself or are there programs/classes out there that I could pass the dataset to and it will do all the formatting?
X-Works is not a framework but a parser. I built my own. If you want to have a parser+framework in one tool, you may take a look at West Wind Connection.