Add a Vista Deep Link to a Crystal Report
Once you have the form name, KeyName fields, and View name, you can add a deep link to a Crystal Report.
- In Crystal Reports, connect to the Vista database and create or open a report.
- In the Field Explorer, right-click SQL Expression Fields and then name the SQL expression in the SQL Expression Name window.
- In the SQL Expression
Editor, enter the SQL expression using the dbo.vfLinkToRecordPrefix(FormName)
and dbo.vfURLEncode(Field) functions, and include the KeyName fields.
In this example of creating a link to a specific record in the PM Project Locations form, the query would be:
dbo.vfLinkToRecordPrefix('PMProjectLoc') + CAST(PMCo as varchar(3)) + '/Project=' + dbo.vfURLEncode(Project) + '/Location=' + dbo.vfURLEncode(Location)
- Click Save and close.
- On a report field where
you want to include a hyperlink, right-click and select Format in the context menu. The Format Editor opens.
- In the Format Editor,
select the Common tab. In the Tool Tip Text field, enter
the URI. Click OK.
Note: Viewpoint links use the custom URI protocol “viewpoint://”. As a security measure, Crystal Reports disables custom URI protocols by default, so Viewpoint links created as Hyperlinks will not work. To work around this, Viewpoint looks for the URI in the Tool Tip Text field.