using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Windows.Forms; using System.Drawing; using System.Data; using FastReport; using FastReport.Data; using FastReport.Dialog; using FastReport.Barcode; using FastReport.Table; using FastReport.Utils; using FastReport.Map; namespace FastReport { public class ReportScript { private Dictionary<string,string> states = new Dictionary<string,string>(); private void Child1_BeforePrint(object sender, EventArgs e) { // extract state names from the map layer foreach (ShapeBase shape in Layer1.Shapes) { var abbrev = shape.SpatialData.GetValue("ABBREV"); var name = shape.SpatialData.GetValue("NAME"); states[abbrev] = name; } } } }