PDA

Click to See Complete Forum and Search --> : Using a text file with crystal reports


rftd
Jun 17th, 2008, 11:55 AM
I asked a similar question in a different forum, but this is a bit more Crystal related.

My question is relatively simple (I think). For my reports, a database on SQL Server is used as the data source. One of the fields in the database (lets call it ID number) consists of 4 digits (e.g. 1234) that identify a card issuer. For example, 1234 might be Mastercard and 4321 might be Visa.

In the reports, I want to display these as the actual name of the Issuer rather than the digits (So the report would show Mastercard instead of 1234). Usually this would be straight-forward, but theres a little twist. Because it is possible that Mastercard might not always be 1234 and Visa might not always be 4321, I want to have a text file that would govern which numbers corresponded to which issuer. In other words, If Mastercard happened to change their 'ID numbers', then one could just go into the text file and change it rather than having to play around with the formula field in crystal reports.

The text file might look something like:

1234 Mastercard
4321 Visa
2345 American Express
(this list could go on indefinitely)

Thanks in advance

jggtz
Jun 17th, 2008, 02:09 PM
In my opinion it's better to create a table to store the data than a txt file

rftd
Jun 17th, 2008, 03:40 PM
that's fine too, as long as the file/table can be easily edited