ComponentOne FlexReport for WinForms
FlexChart Navigation
Working with FlexReportDesigner > Adding FlexReport Fields > FlexChart Field > FlexChart Navigation

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.

  1. In the C1FlexReportDesigner application, create two new reports, Orders Report and Sales Report, by navigating through the Report Wizard.
  2. 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
       
  3. Add a parameter, pYear, to the report and set it's DataType to Integer, Prompt to Year, and Value to 2012.
  4. Add one FlexChart field in Orders Report and two FlexChart field in Sales Report.
  5. Select FlexChart field in Orders Report.
  6. In the Properties window, navigate to Series and click the ellipsis button next to it.
  7. 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).
  8. Navigate to Hyperlink|LinkTarget and set it to Bookmark.
  9. Click the ellipsis button next to the ParameterValues, add a parameter named pYear with =Year(OrderDate) value, and close the ParametersValues Editor.
  10. Set the Hyperlink|Report to Sales Report.
  11. Close the Editor.
  12. Navigate to SeriesGroups and click the ellipsis button next to it.
  13. In the Data Group Collection Editor, click Add button to add a series and set it's GroupExpression to Year(OrderDate).
  14. Close the Editor.
  15. Select the first FlexChart field in Sales Report.
  16. In the Properties window, navigate to Series and click the ellipsis button next to it.
  17. In the Series Collection Editor, click Add button to add a series data group.
  18. Navigate to Hyperlink|LinkTarget and set it to Bookmark.
  19. Set the Bookmark to =Month(OrderDate).
  20. Close the Editor.
  21. Navigate to SeriesGroups and click the ellipsis button next to it.
  22. In the Data Group Collection Editor, click Add button to add a series and set it's GroupExpression to Month(OrderDate).
  23. Close the Editor.
  24. Select the second FlexChart field in Sales Report.
  25. In the Properties window, navigate to Series and click the ellipsis button next to it.
  26. 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).
  27. Close the Editor.
  28. Select the Orders Report and click Preview button to switch to the Preview mode to see how FlexChart navigation works in FlexReport.