This example shows how to use the DashboardExporter component in a console application to export a dashboard with a custom Funnel item.
In the console, run the DashboardExporterApp.exe
application and specify the path where you want to export the document:
D:\work\test\app>DashboardExporterApp.exe D:/work/test
The application generates a PDF file from the Dashboard.xml
dashboard located in the Dashboards folder next to the DashboardExporterApp.exe
application:
The following files are used in this example:
The FunnelItemExportControlProvider
class implements the ICustomExportControlProvider interface. The FunnelItemExportControlProvider
is used to configure the printable control for the custom Funnel item in the dashboard.
The ICustomExportControlProvider.GetPrintableControl method specifies the printable XRChart
control that is used to export the custom Funnel. The method gets CustomItemExportInfo and CustomItemData objects as parameters.
The CustomItemExportInfo
object contains the custom Funnel's export settings as the ExportMode and master filter state.
The ChartControl.SelectionMode
property is updated according to the actual master filter mode.
The SetSelection method updates the custom control according to the current master filter selection.
The ConigureSeries
method is used to bind the custom Funnel chart's series to data and configure them. The CustomItemData.GetBindings method gets a CustomItemBindingValue
collection. Each object in this collection contains information about data items stored in a custom item. The object’s UniqueId
property value can be used as a data member when a custom control is bounded to data.
The CustomItemExportControlCreating event fires for the Funnel item. The FunnelItemExportControlProvider
object is assigned to and the ExportControlProvider property. The property is used to specify the printable control that corresponds to the exported custom Funnel item.
The DashboardExporter.ExportToPdf method exports a dashboard as a PDF file.
- FunnelItemExportControlProvider.cs (VB: FunnelItemExportControlProvider.vb)
- Program.cs (VB: Program.vb)
- Create an Interactive Data-Aware Item for the WinForms Dashboard
- ICustomExportControlProvider
- DashboardExporter
- CustomItemExportControlCreating
- BI Dashboard - Non-Visual Export Component
- BI Dashboard - How to Email a Dashboard that Displays Different Data Depending on the Addressee
- BI Dashboard - How to Use MailKit to Send a Dashboard as a Document in PDF
(you will be redirected to DevExpress.com to submit your response)