Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

UFL to read text files

Posted on 2004-08-02
14
Medium Priority
?
675 Views
Last Modified: 2008-03-06
Hi experts
Can you direct me to a UFL packages that have Text Lookup methods.
(from text files)

0
Comment
Question by:dekt
  • 5
  • 4
  • 2
  • +1
12 Comments
 
LVL 19

Expert Comment

by:GJParker
ID: 11692450
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
 

Author Comment

by:dekt
ID: 11701028
I've checked this one, any others ?
Can you direct to documentation regarding writing UFL in C++
0
 
LVL 23

Expert Comment

by:Ido Millet
ID: 11718927
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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

 
LVL 13

Expert Comment

by:EwaldL
ID: 11741950
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
 

Author Comment

by:dekt
ID: 11745542
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
 

Author Comment

by:dekt
ID: 11745682
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
 
LVL 23

Expert Comment

by:Ido Millet
ID: 11746137
To go beyond 254, you need Crystal 9 or above.

Cheers,
- Ido
0
 

Author Comment

by:dekt
ID: 11746206
In CR9, I can simply increase the value of UFMaxStringLength and compile the UFL ?
0
 
LVL 23

Expert Comment

by:Ido Millet
ID: 11746244
Yes, it should work.  afaik, the new limit (in CR 9 and above) is 64K.

Cheers,
- Ido
0
 
LVL 13

Expert Comment

by:EwaldL
ID: 11746288
formuas can return strings larger than 254 characters in cr 9, but ufls can't. neither in cr 9 nor 10.
0
 
LVL 23

Expert Comment

by:Ido Millet
ID: 11746338
My mistake.  EwaldL is absolutely correct.

Cheers,
- Ido
0
 
LVL 23

Accepted Solution

by:
Ido Millet earned 200 total points
ID: 11748932
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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question