Creating a text file connection (DAO) for “VIMPOUNDMENT.txt” file in SAP Crystal Report 2013 by using following steps. But Firstly create an ODBC Data Source with the Microsoft Text Driver to use text file as Database.
1. Go to Control Panel > ODBC Data Sources.
2. Select the type of DSN you would like to create (User, System, File). Next, click Add.
3. Select Microsoft Text Driver from the list and click on Finish.
4. The ODBC Text Setup window will now appear. In this window, enter the data source name and a description.
5. Uncheck the box for Use Current Directory. Click on the Select Directory button and browse out to the directory where the source file(s) are stored.
6. Click on the Options button. If the extension of the file is not present in the Extension List window, it can now be added. Note if the extension of the file is not .txt or .csv a ‘Read Only’ error may result.
7. Click on Define Format. The Define Text Format window will appear. This is where the options for the delimiter of the file and column headings option can be marked. If the file that has fixed column widths and is not comma or tab delimited, the column widths can be set here. If it is a tab or comma delimited file, the column widths do not need to be specified.
8. Click OK until back on the Control Panel window. The DSN with the Microsoft Text Driver should now be setup. The connection can be tested with applications such as Microsoft Access or Query.
9. Select New Report
10. Select Database Expert
11. Click on Create New Connection from the Data Tab
12. This folder shows sub folders for various data sources you can connect to.
13. Access/Excel (DAO): This lets you connect to a supported database type (Text, Access, dBASE, Excel, Lotus, and so on). You can create a new connection using the Make New Connection option.
14. Select the newly created connection and through the arrow button push it to the Selected Table block
15. Select Next and then select the fields to be viewed in the report
16. Select the available template this is optional and then click on Finish.
17. Click on View in the menu bar select Preview or Preview Sample and you can find the data in the Crystal Report