HyperLinks

/
    Description

    The sample demonstrates report hyperlinks

    You can add links that allow users to open Web pages or other reports, jump to another location within the same report, change C1ReportViewer appearance, or execute custom JavaScript.

    The list of properties used in the sample:

    • FileName - a relative path to the file with report. In this sample, value for this property is set to "Hyperlinks"
    • Zoom - a page zoom value. Accepts named zoom values like "actual size", "fit page", "fit width", "fit height" or value in percentages, e.g. "50%", "70%". For this sample we are using "75%".
    • CollapseToolsPanel - specifies whether the tools panel will be collapsed. We set this property to "true".
    • Height - a height of the control. For this sample we are using "475px".
    • Width - a width of the control. For this sample we are using "100%".

    In this sample we are generating in-memory document. The following code is used to create hyperlinks.

    Navigate last page:
    	renderText.Hyperlink = new C1Hyperlink(
    				new C1LinkTargetPage(PageJumpTypeEnum.Last),
    				"Go to the last page of the document");
    
    Go to the middle of document:
    	rt4.Hyperlink = new C1Hyperlink(doc.Body.Children[doc.Body.Children.Count / 2]);
    
    Open external URL:
    ri1.Hyperlink = new C1Hyperlink(new C1LinkTargetFile("http://www.google.com"),
    		" Go googling... (Use Ctrl+Click in order to open link in a new window");
    
    Open print with preview dialog:
    	rt6.Hyperlink = new C1Hyperlink(new C1LinkTargetFile("exec:printWithPreview()"));
    
    Execute custom javascript action:
    	rt5.Hyperlink = new C1Hyperlink(
    		new C1LinkTargetFile("javascript:alert('Hello')"));
    
    Documentation