This UFL supports multiple text files.
This User Function Library installs seven new functions in the Additional Functions list inside Crystal Reports.
- TextLookupLine( FileName, Search). Open and search FileName for the Search text. The function returns the entire line where the search was found. If the Search is not in the file, an empty string is returned.
- TextLookupColumn( FileName, Search, Col). Open and search FileName. This function assumes that the file is a series of values on a line with a tab or comma to separate the values into columns. The Search is made on the first column (which is regarded as column 0). The values are viewed as additional columns. If a column number of less than 0 or beyond the end of the line is requested a blank value is returned. If the search is not found a blank value is returned.
- TextLookupColumnCount( FileName, Row). Open and search FileName for a specific row (or line). Count the columns in that line and return the number of columns. The values on the line can be tab or comma delimited.
- TextLookupColumnSeperator( FileName). Open and search FileName. Examine the columns in that line and whether it is tab or comma delimited. The function will return Commas or Tabs and is intended for diagnostic use.
- TextLookupLineNumber( FileName, LineNo). Open and search FileName and return a specific line number from the file. If the line number is beyond the end of the file, a blank is returned.
- TextLookupCount( FileName). Open and search FileName and return the number of lines in the file.
- TextLookupConfirm( FileName). Look for FileName and identify if the file is found or not. This is intended for diagnostic purposes.