[]
While using Report Templates in GcWord, you can also add hyperlinks to Word documents which can navigate to any specified web URL.
For example, consider a template layout for GrapeCity Documents products which are added in a table.
A Hyperlink is added to {{linkName}} field by clicking on 'Link' in 'Insert' tab and adding a template tag {{ds.linkURL}} (here ds is the name of data source), into the Address field as shown below:
Consider the following sample data:
[
{
""name"": ""Documents for Word"",
""description"": ""GcWord is a part of GrapeCity Documents that aims to be a complete solution to program and work with Word documents"",
""linkName"": ""Learn More"",
""linkURL"": ""https://www.grapecity.com/documents-api-word""
},
{
""name"": ""Documents for Imaging"",
""description"": ""GcImaging offers imaging API for image processing without using any external image editor."",
""linkName"": ""Learn More"",
""linkURL"": ""https://www.grapecity.com/documents-api-imaging""
},
{
""name"": ""Documents for Pdf"",
""description"": ""GrapeCity Documents for PDF handles majority of the PDF related needs as it conforms to a large part of Adobe PDF specification"",
""linkName"": ""Learn More"",
""linkURL"": ""https://www.grapecity.com/documents-api-word""
}
{
""name"": ""Documents for Excel, .NET"",
""description"": ""GrapeCity Documents for Excel, .NET Edition is a new small-footprint, high-performance spreadsheet component that can be used in your server or desktop applications."",
""linkName"": ""Learn More"",
""linkURL"": ""https://www.grapecity.com/documents-api-excel""
},
{
""name"": ""Documents for Excel, Java"",
""description"": ""GcExcel Java is a high-performance spreadsheet component that comes packaged with all the necessary features to help users handle complex spreadsheet challenges in an efficient way."",
""linkName"": ""Learn More"",
""linkURL"": ""https://www.grapecity.com/documents-api-excel-java""
}
]
The below output is generated upon template processing which contains hyperlinks to corresponding web pages:
Note: GcWord supports using template documents containing malformed URI by rewriting them in a valid manner using MalformedUriRewriter property. To know more, refer Hyperlink.
You can add {{ds.linkURL}} as a hyperlink address on a template tag (as explained above) but it is not allowed to specify any hyperlink inside a template tag.