Using CRXI w/SQL Svr
Hi,
I would like to know how to display just the path portion of the filename.
I changed the Syntax to Basic in the Formula Editor, but CRXI doesn't like the formula. It doesn't seem to recognize 'GetFilePath':
@ReportPath
'Retrieve a file's path without the trailing back slashes
'To include colons in the result
Function GetFilePath (FileName As String) as String
Dim i as Long
For i = Len(FileName) To 1 Step -1
Select Case Mid$(FileName, i, 1)
Case ":"
GetFilePath = Left$(FileName, i)
Exit For
Case "\"
GetFilePath = Left$(FileName, i -1)
Exit For
Next
End Function
Is there a way to do this using Crystal Syntax?
I was able to extract the File from FileName using:
@ReportFileName
StringVar Array File:=Split (Filename, '\');
NumberVar i := Ubound(File);
File;
But I can't figure out how to get just the path.
Your help would be greatly appreciated.
LT
Hi,
I would like to know how to display just the path portion of the filename.
I changed the Syntax to Basic in the Formula Editor, but CRXI doesn't like the formula. It doesn't seem to recognize 'GetFilePath':
@ReportPath
'Retrieve a file's path without the trailing back slashes
'To include colons in the result
Function GetFilePath (FileName As String) as String
Dim i as Long
For i = Len(FileName) To 1 Step -1
Select Case Mid$(FileName, i, 1)
Case ":"
GetFilePath = Left$(FileName, i)
Exit For
Case "\"
GetFilePath = Left$(FileName, i -1)
Exit For
Next
End Function
Is there a way to do this using Crystal Syntax?
I was able to extract the File from FileName using:
@ReportFileName
StringVar Array File:=Split (Filename, '\');
NumberVar i := Ubound(File);
File;
But I can't figure out how to get just the path.
Your help would be greatly appreciated.
LT