Solved

UFL to read text files

Posted on 2004-08-02
14
668 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
 
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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. …
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 …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

707 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

14 Experts available now in Live!

Get 1:1 Help Now