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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing Text File into a Formula 1

Status
Not open for further replies.

xdavis24

Programmer
Aug 9, 2001
18
US
In Crystal Reports 9, we have a formula that imports a plain text file. Is it necessary for that text file to be placed on the report server or is the formula somehow attached to the *.rpt file? And if it is attached, after updating the text file, will simply doing insert | file be enough to reattach or is there a process for handling this task?

Thanks for your help

Xd
 
The formula is attached to the report, and depending upon what you mean by a formula which attaches a file (I didn't know that this was possible, how are you doing this, using a UFL?).

Did you mean to say that you use Insert->OLE Object or Hyperlink?

If you used a Insert->OLE Object then you can also select link, but the server would have to have the same pathing as the dev machine.

-k
 
Thanks for your reply. I didn't originally code the report but it is a Visual Basic UFL. The text file contains a list of the company's holidays for 2003 and the code is designed to determine business days (days - weekends- holidays) Here is the code:



// ENTER TEXT FILE PATH
wdaysclass1wdloadfile("c:\USAHolidays.txt");

stringvar workingdays:= "-23456-";


numbervar totaldays := wdaysclass1wdnumworkdays(date(startdate),date(enddate),workingdays)- 1;
 
Another approach, and one common to data warejousing si to supply an Enterprise wide solution by creating a period table, and joining your data to it.

I have a FAQ here on doing this, which includes a SQL Server script to create and populate most of it:

faq767-4532

This is also very helpful when you need to generate reports which includes data that the data does not support.

-k
 
Thanks. We will probably have to move to this method.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top