Generate a report


Purpose
This sample shows how to create a report using a selected template. The user is given a set of templates to choose from. The selected report template is then exported to a Portable Document Format (PDF) file. The templates are set to use the data included in the software development kit (SDK) installation.

How to use

See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample.

Data has been provided for your use with this sample. It can be found at <Your ArcGIS Developer Kit Install directory>/Samples/data/California/California.gdb.
If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Start Visual Studio and build the solution.
  2. Start ArcMap. Click the Customize menu.
  3. Select Add-In Manager. Ensure that Custom Report Add-Ins is installed.
  4. Click Customize.
  5. Click the Commands tab. Under the Categories panel, browse to Add-In Controls.
  6. Click and drag the "Generate a report" button to ArcMap's toolbar from the Commands panel.
  7. Add the Counties layer to the table of contents (TOC) in ArcMap. The layer path is located at ArcGIS data sample location (that is, C:\Program Files (x86)\ArcGIS\DeveloperKit10.1\Samples\data\California).
  8. Click the "Generate a report" button.

GenerateReport.cs The class file that launches the ExportReport form.
ExportReport.cs The form the user interacts with. It allows the user to choose the report to export.
Download the C# files
GenerateReport.vb The class file that launches the ExportReport form.
ExportReport.vb The form the user interacts with. It allows the user to choose the report to export.
Download the VB.NET files

Download the files for all languages

See Also:

How to register COM components
Working with reports




Development licensing Deployment licensing
ArcGIS for Desktop Basic
ArcGIS for Desktop Standard
ArcGIS for Desktop Advanced