kedar pawgi

kedar pawgi

  • NA
  • 105
  • 38.1k

sending SQL query data in formatted way to text file in C#

May 18 2013 6:39 AM
I am using C# 2008 crystal report, i want to do the report dynamically but instead of that can i know how can i send SQL query out put to a text file in following format. Following format is just to show, original format is like Account ledger where on left side is credit side and on right side is debit side.

Instead of showing in crystal report how i can show in text file.

---------------------------------------------------------------------------------------------------------------------
  ABC Enterprise
---------------------------------------------------------------------------------------------------------------------
|  Credit    |        Debit                             | ---------------------------------------------------------------------------------------------------------------------
Sr No | amt Paid  |  SrNo  | Sale Bill No  |  Amount

---------------------------------------------------------------------------------------------------------------------

1  | 700.00     | 1   |  110   |  800.00  |
2  | 800.00   | 2   |    124   |  5000.00                               |
---------------------------------------------------------------------------------------------------------------------
Cr.     |1500.00   |  Dr         5800.00


---------------------------------------------------------------------------------------------------------------------


This is just to show how i want, this is not exact format but i want to format like this with the data i get from the sql statement, or how can i do it programmatically into crystal report.
Thanks in Advance