I have created a formula called @TemplateFileName with the following codes
------------------------------------------------------
WhileReadingRecords
dim pos as number
dim pos2 as number
pos = InStrRev(Filename,"\")
if (pos = -1)then
pos2 = -1
elseif (pos > 0) then
pos2 = InStrRev(Filename,"\", pos -1)
else
pos2 = -1
end if
if (pos = -1) then
formula = Filename
elseif (pos2 > -1) then
formula = Mid (Filename, pos2 +1)
else
formula = Mid (Filename, pos + 1)
end if
------------------------------------------------------
If I use this formula in the report footer of Crystal Reports It gives me the following path:
Desktop\Talent Tenture Bonus.rpt
Once i save the report to Business Objects Enterprise in a folder TBG and sub folder Testing, the same formula gives me the following result:
5\~crw{20477165-33F1-4914-ABA8-2CA0C4048328}.rpt
How do I get the path for the folder to be
TBG\Testing\Talent Tenture Bonus.rpt
Thanks
-P
------------------------------------------------------
WhileReadingRecords
dim pos as number
dim pos2 as number
pos = InStrRev(Filename,"\")
if (pos = -1)then
pos2 = -1
elseif (pos > 0) then
pos2 = InStrRev(Filename,"\", pos -1)
else
pos2 = -1
end if
if (pos = -1) then
formula = Filename
elseif (pos2 > -1) then
formula = Mid (Filename, pos2 +1)
else
formula = Mid (Filename, pos + 1)
end if
------------------------------------------------------
If I use this formula in the report footer of Crystal Reports It gives me the following path:
Desktop\Talent Tenture Bonus.rpt
Once i save the report to Business Objects Enterprise in a folder TBG and sub folder Testing, the same formula gives me the following result:
5\~crw{20477165-33F1-4914-ABA8-2CA0C4048328}.rpt
How do I get the path for the folder to be
TBG\Testing\Talent Tenture Bonus.rpt
Thanks
-P