Crystal Reports & SQL Reporting Services Training Consultants
Account Log in:
Username:
Password:
Be a leader: Remember the one in front is the only one with a decent forward view
 
Institute of IT Trainers - Freelance Trainer of the Year 2006 & 2009
Liverpool Business Connect Member
  Maximum Impact Solutions Limited - Reporting Solutions, Creating Answers
Reporting Solutions - Creating Answers, Crystal Reports, Dashboarding (Xcelsius) & SQL Reporting Services

The Maximum Impact Solutions Blog Feed ME!!!!

04
October

How Do I Extract the File Name from the Path in Crystal Reports XI?

A client recently asked me "How do I extract the filename from the path, in the filename special field in Crystal Reports XI?"

Solution:

Using an array the Split and Unbound functions one can extract the file part from the file path, of the Filename special field.

The formula that will do this is below:

WhilePrintingRecords;
StringVar Array ExtractFile := Split(filename,'\');
NumberVar i := Ubound(ExtractFile);
ExtractFile[i]



If you have any questions, leave us a comment below, or need any assistance, please do not hesitate to Contact Us

MAKE A COMMENT

Name *

Email Address *

Comment *

To prove you are human what is:

9 + 2 =