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

Crystal Reports File Path

Status
Not open for further replies.

21128

Programmer
Aug 27, 2009
36
0
0
US
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
 
I believe you would have to hard code the path. Unfortunately once the report has been saved to Enterprise, it uses it's own internal format for the file path and report name. I do not know of a way around this issue.
 
The FileName special field gives you the actual physical file name of the the report. What you see after publishing the report to BO is the location of the report in the file repository. There is no way to get the information about which folder that's displayed in BO that the report is located in. This is something you'll have to hard-code into your report.

-Dell

DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top