• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 677
  • Last Modified:

UFL to read text files

Hi experts
Can you direct me to a UFL packages that have Text Lookup methods.
(from text files)

0
dekt
Asked:
dekt
  • 5
  • 4
  • 2
  • +1
1 Solution
 
GJParkerCommented:
Heres's one I know about by Chelseas Technologies  cViewText which works with Version 8.5 and later

http://www.chelseatech.co.nz/

Gary
0
 
dektAuthor Commented:
I've checked this one, any others ?
Can you direct to documentation regarding writing UFL in C++
0
 
Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
See list of 3rd-party tools at: http://www.kenhamady.com/bookmarks.html

My CUT Light UFL has a FileGetText() function that loads the content of a given file into a String.  You can then do the text lookup by using the regular string search functions within Crystal.  

If you explain the lookup challenge you are facing, it may be easier to advise.  Is it by chance a lookup of a value in an ini file?

hth,
- Ido
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
EwaldLCommented:
this is C++ project, which creates a ufl. The ufl works with 8.5 and higher
http://support.businessobjects.com/communityCS/FilesAndUpdates/cr_ufl_cpp_general.exe.asp
0
 
dektAuthor Commented:
I want to read a Unicode text file in a 'key/value' manner.
example:

dim valueStr as String
dim myKeyas String

valueStr = readKey(myKey)

the valueStr should be a String larger than 254 charachters (127 in unicode)

Ido, I will look at your links, thanks.

dekel
0
 
dektAuthor Commented:
Are you aware if there is a way to increase the size of UFMaxStringLength ?
(the maximum characters allowed to retrieve from a UFL method) ?
0
 
Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
To go beyond 254, you need Crystal 9 or above.

Cheers,
- Ido
0
 
dektAuthor Commented:
In CR9, I can simply increase the value of UFMaxStringLength and compile the UFL ?
0
 
Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
Yes, it should work.  afaik, the new limit (in CR 9 and above) is 64K.

Cheers,
- Ido
0
 
EwaldLCommented:
formuas can return strings larger than 254 characters in cr 9, but ufls can't. neither in cr 9 nor 10.
0
 
Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
My mistake.  EwaldL is absolutely correct.

Cheers,
- Ido
0
 
Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
Dekel,

I solved this issue in my UFL as follows (it should be easy for you to use the same approach):

1. The function breaks the file content to segments of 254 characters each and returns the
number specified by a Segment_N argument.

2. In Crystal, use the following formula to append the content to a string variable:
-----------------------------------------------------------------
StringVar sFile;
NumberVar i;
i := 1;
// Keep appending segments of 254 characters to the sFile string until
// we reach the end of the file
while FileGetText( "c:\temp\test.txt", i) <>"" Do
(
sFile := sFile + FileGetText( "c:\temp\test.ini", i);
i := i + 1
);
// Return the resulting string
sFile;
-----------------------------------------------------------------

Cheers,
- Ido
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 4
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now