How can I generate a report by reading fields from my database?