[RESOLVED] Display File Name in Crystal Report 11.0
I'm using Crystal Report 11.0 to display data from a system that sits on Sql database server. The application system is from a vendor and I have no control over they system.
Currently, I'm displaying the file name and path using the "File Path And Name" at Special Fields in Crystal Report. Unfortunately, it's displaying the location of the report which in my case the report folder in a server. How can I make it to display only the filename without the location or path?
Previously, in a different company I have the control on the application system. Thus, I pass a formula/parameter from the application system that contains the filename into the crystal report. Since I don't have any control on this application system I'm not sure how can I do this. Please advise.
Re: Display File Name in Crystal Report 11.0
try..
place the file P&n. rt click->Format Field->Display string->X-2
and paste this code
Code:
filename [ InstrRev ( filename , '\') + 1 to Length (FileName) -4]
:wave:
Re: Display File Name in Crystal Report 11.0
if you want the extension as well simply remove the -4
Code:
filename [ InstrRev ( filename , '\') + 1 to Length (FileName) ]
Re: Display File Name in Crystal Report 11.0
Quote:
Originally Posted by VBFnewcomer
if you want the extension as well simply remove the
-4
Code:
filename [ InstrRev ( filename , '\') + 1 to Length (FileName) ]
thank you so much :thumb: :thumb: .. u saved my life!!! :wave: :
Re: Display File Name in Crystal Report 11.0
now you save our life by making the Thead Resolved :D :D
:wave:
BTW have you seen my thread