In This Topic
FlexChart field allows navigation to another report, a URL or script via the Hyperlink property of FlexChartField or a particular Series.
Suppose you want to show Total Orders per Year and monthly sales for a particular year. Both these tasks can be achieved in FlexReport using FlexChart navigation feature. In one report, the chart shows Total Orders per year and in the other, the chart shows Sales per Month along with the total orders and amount received every month. If you click on one series, the report navigates to the chart and pass the year for which Monthly sales are shown.
Let us create a report to navigate from a series to other report, or data within a report.
- In the FlexReportDesigner application, create two new reports, Orders Report and Sales Report, by navigating through the Report Wizard.
- Bind the reports to the Main data source, by specifying the following Sql Statement.
SELECT o.OrderDate, od.Quantity * od.UnitPrice AS OrderItemSum FROM Orders AS o, [Order Details] AS od WHERE o.OrderId = od.OrderId
- Add a parameter, pYear, to the report and set it's DataType to Integer, Prompt to Year, and Value to 2012.
- Add one FlexChart field in Orders Report and two FlexChart field in Sales Report.
- Select FlexChart field in Orders Report.
- In the Properties window, navigate to Series and click the ellipsis button next to it.
- In the Series Collection Editor, click Add button to add a series data group, navigate to Data|YExpression and set it's value to Sum(OrderItemSum).
- Navigate to Hyperlink|LinkTarget and set it to Bookmark.
- Click the ellipsis button next to the ParameterValues, add a parameter named pYear with =Year(OrderDate) value, and close the ParametersValues Editor.
- Set the Hyperlink|Report to Sales Report.
- Close the Editor.
- Navigate to SeriesGroups and click the ellipsis button next to it.
- In the Data Group Collection Editor, click Add button to add a series and set it's GroupExpression to Year(OrderDate).
- Close the Editor.
- Select the first FlexChart field in Sales Report.
- In the Properties window, navigate to Series and click the ellipsis button next to it.
- In the Series Collection Editor, click Add button to add a series data group.
- Navigate to Hyperlink|LinkTarget and set it to Bookmark.
- Set the Bookmark to =Month(OrderDate).
- Close the Editor.
- Navigate to SeriesGroups and click the ellipsis button next to it.
- In the Data Group Collection Editor, click Add button to add a series and set it's GroupExpression to Month(OrderDate).
- Close the Editor.
- Select the second FlexChart field in Sales Report.
- In the Properties window, navigate to Series and click the ellipsis button next to it.
- In the Series Collection Editor, click Add button to add a series data group, navigate to Data|YExpression and set it's value to Sum(OrderSum).
- Close the Editor.
- Select the Orders Report and click Preview button to switch to the Preview mode to see how FlexChart navigation works in FlexReport.