Jump to content

App Studio - Enabling a Field to Behave As a Hyperlink


Ben Maxwell
Go to solution Solved by Erin Trotter,

Recommended Posts

 

I'm attempting to write a report in AppStudio which points to a table which contains various hyperlinks.

image.png.17a28df39a7c3c234f3f207cf4d7cc48.png

 

Is there a way for me to change the setting so that the above gets treated as a direct hyperlink as opposed to having the need to copy and paste the link into a browser?

 

Ben

Link to comment
Share on other sites

This was set up for Ben to play with:

SQL Table:

image.png.265a5e6fbe232011775aebd6589099e6.png

Master File:

image.thumb.png.6e2ec9f01189c253af106f18dc02ccbe.png

Focus Report off new master file:

image.png.01294f3c403729f24db3341415b2202c.png

We want the Document Link column above to be a clickable hyperlink on a Focus Report. Does the column type on the SQL table need to be something specific and the master file rebuilt? Does the master file need to have a property set.  Is this done within and App Studio Report fex? 

Link to comment
Share on other sites

If you are using the App Studio GUI, you could take a look at the App Studio User's Guide.  Look for the section titled 'Creating Drill-Down Hyperlinks Using the Drill Down Command'.  If you are hand coding, another method besides Erin's is to use style sheet syntax:  

TYPE=type, [subtype], URL=url[(parameters ...)], [TARGET=frame,] [ALT = 'description',] $

You can refer to a report column in the URL component if the URL is dynamic based on report data.  You can find more information on this in the Creating Reports with WebFOCUS Language manual.

 

Link to comment
Share on other sites

Good Moring Erin,

I am wondering how your defined link works. When you drag that defined column to a report and the report is run, does it 'light up' like hyperlink? If it does then this is what we are looking for. It then would seem we need to get the syntax correctly integrated with the link  stored in our column. Perhaps that is where the <a hxref' comes in etc?  We just thought since we could copy/paste the link as is from our table column,  into a browser, it would work as such.

image.png.b1f0f0fa37a20f241870f9e0fdd4cf08.png

 

Link to comment
Share on other sites

Posted (edited)

Good one Erin. Note that this behavior is dependent on the setting HTMLENCODE which I think defaults to OFF, the setting you want in this situation. If you turn it on (or it was defaulted to ON in your environment):

SET HTMLENCODE=ON
TABLE FILE CAR  PRINT COUNTRY
COMPUTE HTML/A999 = '<a href=https://www.ibi.com>ibi</a>';
END

it results in showing the actual HTML code:
image.png.13bc71f71c520afd1bcfc9f2e844f7fb.png

Also, if the report output's to PDF or Excel, you will probably want to alter the DEFINE to do something different. 

Edited by David Beagan
Add more information
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...