cancel
Showing results for 
Search instead for 
Did you mean: 

CR2013 - Dynamic fetching BI server host name

Former Member
0 Kudos

I have a hyperlink inside Crystal Report A which point to Crystal Report B

The link is "http://bi-test.net/BOE/OpenDocument/opendoc/openDocument.jsp?sDocName=Crystal Report B"

This kind of harcoded link creates issue when migrating object from DEV to TEST to PROD.

I have to manually update the link each time.

Can i dynamically fetch the host name 'bi-test' on which the server is running and use it somehow to build this link?

I am using CR2013

Vishal

Accepted Solutions (0)

Answers (1)

Answers (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Vishal,

Use relative path like this one:

//BOE/OpenDocument/opendoc/openDocument.jsp?sDocName=Crystal Report B


-Abhilash

Former Member
0 Kudos

I tried this but I am getting error - remaining text doesn't appear to be part of formula

//BOE/OpenDocument/opendoc/openDocument.jsp?sDocName=Crude_GathHand_Rep_Excel_Export&sPath=[GIS],[TRC6],[D04],[INTERNAL],[Metrics]

& '&lsS' + urlencode('RPT_PERIOD',2) + '=' + urlencode({?RPT_PERIOD},2)

& '&sOutputFormat=E'

& '&sWindow=New'

old working formula

'http://bi-dev.net/BOE/OpenDocument/opendoc/openDocument.jsp?sDocName=Crude_GathHand_Rep_Excel_Export...'

& '&lsS' + urlencode('RPT_PERIOD',2) + '=' + urlencode({?RPT_PERIOD},2)

& '&sOutputFormat=E'

& '&sWindow=New'

abhilash_kumar
Active Contributor
0 Kudos

You're missing the single quotes around the path:

'//BOE/OpenDocument/opendoc/openDocument.jsp?sDocName=Crude_GathHand_Rep_Excel_Export&sPath=[GIS],[TRC6],[D04],[INTERNAL],[Metrics]'

& '&lsS' + urlencode('RPT_PERIOD',2) + '=' + urlencode({?RPT_PERIOD},2)

& '&sOutputFormat=E'

& '&sWindow=New'

-Abhilash

Former Member
0 Kudos

doesnt work. on lick of hyper link I get below link is generated

the host name is not captured

https://boe/OpenDocument/opendoc/openDocument.jsp?sDocName=Crude_GathHand_Rep_Excel_Export&sPath=[GI...

abhilash_kumar
Active Contributor
0 Kudos

Did you try running this report from the LaunchPad?

When you click the hyperlink, does it open the target report?

-Abhilash

Former Member
0 Kudos

yes ran report A from launchpad then clicked on hyperlink to launch report B

it fails as its unable to fetch host name

abhilash_kumar
Active Contributor
0 Kudos

Try:

'/BOE/OpenDocument/opendoc/openDocument.jsp?sDocName=Crude_GathHand_Rep_Excel_Export&sPath=[GIS],[TRC6],[D04],[INTERNAL],[Metrics]'

& '&lsS' + urlencode('RPT_PERIOD',2) + '=' + urlencode({?RPT_PERIOD},2)

& '&sOutputFormat=E'

& '&sWindow=New'

-Abhilash

Former Member
0 Kudos

No this syntax also doesn't work, any other approach?