One feature of FlexChartField is that you can navigate from the FlexChart to some other point within a FlexReport. When the report involves numbers (either shown in a table or a chart), you can use this feature to offer additional information about a specific data point in the series: the methodology, for instance, or summary values.
The navigation feature allows the user to navigate directly to the exact details, instead of traversing through a number of pages, to reach to the required information.
Navigation in FlexChart Field
When you're showing data in FlexReport through FlexChart Field, navigation from FlexChart can be done either through the chart itself or through it's Series. The LinkTarget can be one of the following:
- Bookmark – Points to some location within report or another report
- URL – Jumps to an external document, file or URL.
- Script – Executes a script like changing the report parameters' values, properties of the report's fields, sections and so on.
Suppose you have a chart that shows Monthly Sales Data of a company in a year. The following chart is created using FlexChart Field in FlexReport:
For every month, you may want to see the summary of total number of orders and total sum of orders in that month; we'll say those totals are displayed in a textbox in the report. If a user clicks on August bar in the chart, the report should navigate to the summary of month of August.
In this case, we need to navigate from a Chart series to a Textbox in the report. This type of navigation uses LinkTarget as Bookmark navigation.
Steps to add Navigation in FlexChart Field
Here's how we do it. You'll find it works similarly to anchors and bookmarks in an HTML page.
- Select the FlexChart Field from which you want to jump to other location.
- Go to the Series collection editor.
- In the Hyperlink property, set LinkTarget as Bookmark.
- Set LinkTarget > Bookmark property to "=Month(OrderDate)" (as the data needs to be shown for this particular month)
- Now in the Summary Textbox (the one you're jumping to) set Bookmark = "Month(OrderDate)".
Using these steps, you can click on any month on the chart and see the order summary for the month below in the report.
So, if you click on month of August in above chart, the report jumps to the following location:
For a complete sample, refer to FlexChart Navigation and FlexChart Navigation2 reports in FlexCommonTasks.flxr in FlexCommonTasks sample here.