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

Displaying File Name WITHOUT Path 1

Status
Not open for further replies.

MJRBIM

MIS
May 30, 2003
1,579
CA
Using CR 9 I'm trying to print JUST the filename.rpt in the page footer.

I don't want the ENTIRE PATH - C:\CRYSTAL REPORTS\filename.rpt

I tried creating a formula using the Functions -> Document Properties -> Filename field in a formula, BUT it returned the ENTIRE PATH. All I want to display is "filename.rpt"

Suggested solutions would be welcome...Thanks!

 
Create a formula :

Mid(Filename,instrrev(Filename,"\")+1)

Let me know how you get on.....

Reebo
Scotland (Sunny with a Smile)
 
Or you might consider using the File->Summary Info->Title which is available as the special field "Report Title".

-k
 
That was so obvious...didn't even think of it...brain slowly melting I guess...D'oh!

Your formula solution worked.

THANKS
 
SV,

That doesn't update automatically. You would have to go and change the summary info if you did a save as.

Reebo
Scotland (Sunny with a Smile)
 
If someone needs to do this in older versions of CR (like v7 where there is no InStrRev) I have a formula for this on the FORMULAS page of my web site that works in any version.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Guide to Crystal in VB
- tek@kenhamady.com
 
Reebo,
that is SO much easier than the one i have been using. i had just copied the one that our guy in IS had been using; but it is huge and looks very complicated...

thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top