I have an application to generate dynamic reports using dynamic SQLs. The results of the query will be stored in datatables. I need a function to take the datatable and column width as input and print report in HTML/Text format. The function should identify correct data type of datacolumn and format it as per the data type.
I’ll write a query like this and fetch the values into data table:
SELECT [ID]
,[AccountName] AS [Account Name]
,[TransDate] AS [Trans Date]
,[Amount]
FROM [AccountsTable]
The following is the result set in datatable:
ID [Account Name] [Trans Date] [Amount]
656 Sales Account 14-Apr-2003 13500.00
657 Purchase Account 15-Apr-2003 2000.00
658 Cheque Account 15-Apr-2003 5250.00
659 Sales Account 16-Apr-2003 8000.00
660 Cheque Account 17-Apr-2003 6500.00
661 Purchase Account 18-Apr-2003 1000.00
662 Trade Account 18-Apr-2003 10250.00
663 Discount Account 19-Apr-2003 500.00
Totals: 47000.00
I would like to print these values into HTML File as shown above. Please help me.
1 Answer