Solved

UFL to read text files

Posted on 2004-08-02
14
673 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
  • +1
14 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
Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

 
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 50 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

617 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