Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

import data from text file into array

Status
Not open for further replies.

wmbb

Technical User
Jul 17, 2005
320
0
0
NL
I'm using several reports using the same array defined in a formula field:
Code:
NumberVar array MANHR := [141,155,169,148];
NumberVar array MANHR1 := [146,161,175,153]; 		
NumberVar array MANHR2 := [77,77,77,77];	
NumberVar array MANHR3 := [260,286,312,273];	
NumberVar array MANHR4 := [212,233,254,223];	
NumberVar array MANHR5 := [172,189,206,181];

But when the data changes I have to modify all the array definitions in all reports.
Is it possible to read the array data from a file so I only have to modify that one file.
 
I see two options for doing this. You could create a subreport to read the file and load the array. But that would mean the array is WhilePrintingRecords and would limit what you can do with it. You could also use a UFL function to read the text into a formula. There are a list of them in this article and at least 2 of them allow you to read values from text files:

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
 
Thank you for your response but I'll keep in the way it is.
It costs to much effort compared to modifying the array in the reports.
Option 2 was a nice option I think but this means that all users have to install the function.
Standard users are using the runtime version to create the reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top