Solved

UFL to read text files

Posted on 2004-08-02
14
669 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
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 22

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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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 22

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 22

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 22

Expert Comment

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

Cheers,
- Ido
0
 
LVL 22

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
I do a File --> Open and Crystal just sits there 5 64
Selection formula 7 53
Crystal Reports - Trim Data 7 48
Crystal Reports last day of month 2 52
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. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

813 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now