Results 1 to 5 of 5

Thread: [RESOLVED] Display File Name in Crystal Report 11.0

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2007
    Posts
    138

    Resolved [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.

  2. #2
    Frenzied Member
    Join Date
    Aug 2006
    Location
    India, Punjab, Bhatinda
    Posts
    1,689

    Thumbs up 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]

  3. #3
    Frenzied Member
    Join Date
    Aug 2006
    Location
    India, Punjab, Bhatinda
    Posts
    1,689

    Cool 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) ]

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jan 2007
    Posts
    138

    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 .. u saved my life!!! :

  5. #5
    Frenzied Member
    Join Date
    Aug 2006
    Location
    India, Punjab, Bhatinda
    Posts
    1,689

    Re: Display File Name in Crystal Report 11.0

    now you save our life by making the Thead Resolved

    BTW have you seen my thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width