Click here to Skip to main content
15,885,141 members
Articles / Desktop Programming / Windows Forms
Article

Convert Query Result into *.CSV, *.TXT, *.XLS or Fill Into Crystal Report

Rate me:
Please Sign up or sign in to vote.
4.30/5 (7 votes)
11 Jul 2008CPOL3 min read 88.7K   1.9K   69   8
This utility is used for convert query result into *.CSV, *.TXT, *.XLS or Fill Into Crystal Report, supported SQL Server and ODBC connection.

Database To Text File Utility

“Database to text file” is a small utility that encourage anyone who need to export the query results into a file. Now, it supports the SQL Server and ODBC connections. Besides export query results into text file, it support to print your query results out with Crystal Report.

Features

  • Export query’s result into text file,
  • Export query’s result into Microsoft Excel,
  • Print Query Result using Crystal Report,
  • Export or import query setting from developer to end user or vice versa,
  • Easy to maintain the query,
  • Result can be ordered,
  • Flexible filter feature,
  • Support SQL Server and ODBC connection,
  • Preview Query Result,
  • Generating fields definition only (TTX) or XML Schema to support reporting in Crystal Report,
  • Shortcuts to access menu,
  • Developed using C# .Net,
  • Long live innovation features in the future,
  • Attached with samples using ODBC for best practice,
  • FREEWARE : Free to use, free to distribute

How To Use ?

To using this utility, you need to do an installment first. If your computer has not been installed with .Net Framework, you need to installed it first (click here to download).
This utility can be divided into 2 kind of purpose :
  • Client Using
  • Developer Using
This utility can be distributed to end user who did not knew about queries. After installation process completed, the utility will perform as “client using” with a query sample displayed. If you need to modify the query, you must switch the utility into the developer state.

How to switch to developer state ?

In order to run at developer state, you need to run from “Run” window, and type this command : "...\program files\db2text\dbtottext.exe" WilTech-Center. Now, you can add your new query, modify the existing query or delete your query.

How to Export the Query’s Setting ?

To export your query setting, you simply click the menu : File > Export Configuration’s Setting With this features, you can get all query setting, including the column setting and connection settings.

How to Import the Query’s Setting ?

To import your query setting, you simply click the menu : File > Import Configuration’s Setting With this features, you can distribute the query to the end user including the columns settings. After imported the setting, you need to close the utility and re-open it again.

How to Print your Query’s Result to Crystal Report?

You must already have a Crystal Report file (*.rpt) that has been design followed the query. If you want to design and need to use field definition from your query, you can generate them by click on File>Generate Field Definition (Ctrl+D), you can chose the file type in order to generate to TTX or XML’s File. After designed your report, from Database To Text Utility, you can print the query result by click on File>Print As Report (Ctrl+P).

History :

11 July 2008 (Version : 1.2.1)
  • Some bugs fixed
03 May 2008 (Version : 1.2.0)
  • Re-launching at www.wiltech-center.com and submit in www.codeproject.com
  • Auto sign column order
09 April 2008 (Version : 1.1.0)
  • Support ODBC connection,
  • Preview Query Result,
  • Generating fields definition only (TTX) or XML Schema to support reporting in Crystal Report,
  • Print Query Result using Crystal Report,
  • Add shortcut to access menu,
  • Bugs fixed in filter condition
17 April 2008 (Version : 1.1.1)
  • Export query’s result into Microsoft Excel,
  • Attached with samples using DNS for best practice
03 April 2008 (Version : 1.0.0)

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) www.wiltech-center.com
Indonesia Indonesia
visit me at : www.wiltech-center.com

Comments and Discussions

 
QuestionIs there an API? Pin
PIEBALDconsult27-Apr-08 16:26
mvePIEBALDconsult27-Apr-08 16:26 
AnswerRe: Is there an API? Pin
Wiltek Ghozali27-Apr-08 17:34
Wiltek Ghozali27-Apr-08 17:34 
GeneralRe: Is there an API? Pin
Srinath Gopinath12-May-08 19:01
Srinath Gopinath12-May-08 19:01 
GeneralRe: Is there an API? Pin
Wiltek Ghozali12-May-08 19:58
Wiltek Ghozali12-May-08 19:58 
QuestionNo source code now? Pin
AlexandreN26-Apr-08 23:50
AlexandreN26-Apr-08 23:50 
Souce code seems to be not available? Is that correct?
AnswerRe: No source code now? Pin
Wiltek Ghozali27-Apr-08 15:42
Wiltek Ghozali27-Apr-08 15:42 
AnswerRe: No source code now? Pin
Wiltek Ghozali27-Apr-08 16:11
Wiltek Ghozali27-Apr-08 16:11 
QuestionHow does it compare to.. Pin
Philip Laureano17-Apr-08 17:04
Philip Laureano17-Apr-08 17:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.