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 |