FRAMES | NO FRAMES |
Creates a report that assigns customer records to one of five match levels based on the geographic code assigned to each customer while geocoding.
Availability: Business Analyst Server 10.0 SP1.
TaskResultOutput MatchLevelSummaryReport ( MatchLevelSummaryReportParameters Parameters, esriReportFormat ReportFormat, TaskOutputType[] OutputTypes, esriFolderItem OutputReportItem );
Parameter | Description |
---|---|
Parameters | Configuration options for analysis. Type MatchLevelSummaryReportParameters. |
ReportFormat | This parameter should be null. This parameter is deprecated. |
OutputTypes | Array of task output options. Options for this method include creating a report (GetReport). Type TaskOutputType[]. |
OutputReportItem | (Optional
parameter — can be null). Configuration options for storing the output report in the repository. This will enable viewing and working with the output result in subsequent tasks. Type esriFolderItem. |
Variable of type TaskResultOutput
The example below generates a report for two customer points.
C# |
// Instantiate the BAServerHelper class to access analysis methods BAServerHelper baServerHelper = new BAServerHelper(); baServerHelper.ActiveDatasetID = "USA_ESRI"; // Optional parameter baServerHelper.IsFullErrorMessage = true; // Default is false // ========= STEP 1: Create a record set by store addresses RecordSetByAddress[] storeAddresses = new RecordSetByAddress[2]; storeAddresses[0] = new RecordSetByAddress(); storeAddresses[0].Name = "store1"; storeAddresses[0].Description = "Redlands Office"; storeAddresses[0].StoreID = "1"; storeAddresses[0].Address = "380 New York St."; storeAddresses[0].City = "Redlands"; storeAddresses[0].State = "CA"; storeAddresses[0].ZIP = "92373"; storeAddresses[1] = new RecordSetByAddress(); storeAddresses[1].Name = "store2"; storeAddresses[1].Description = "La Jolla Office"; storeAddresses[1].StoreID = "2"; storeAddresses[1].Address = "3252 Holiday Court"; storeAddresses[1].City = "La Jolla"; storeAddresses[1].State = "CA"; storeAddresses[1].ZIP = "92037"; TaskResultOutput recordSetResult = baServerHelper.CreateRecordSetByAddresses(storeAddresses, esriFolderType.esriFolderStoreLayers); TableData tableData = new TableData(); tableData.RecordSet = recordSetResult.RecordSet; GeocodeData geocodeData = new GeocodeData(); geocodeData.Table = tableData; // ========= STEP 2: Geocode the record set with stores CustomerStoreSetupByGeocodeTableParameters geocodeParameters = new CustomerStoreSetupByGeocodeTableParameters(); // Set specific analysis parameters geocodeParameters.GeocodeCustomers = false; geocodeParameters.GeocodeData = geocodeData; geocodeParameters.NameField = "NAME"; geocodeParameters.StoreIDField = "STORE_ID"; // Set other parameters TaskOutputType[] outputOptions = new TaskOutputType[] { TaskOutputType.GetFeatureClass }; RenderingParameters imageOptions = null; esriFolderItem outputLayer = null; TaskResultOutput storeSetupResult = baServerHelper.CustomerStoreSetupByGeocodeTable(geocodeParameters, imageOptions, outputOptions, outputLayer); PointLayer storeLayer = new PointLayer(); storeLayer.RecordSet = storeSetupResult.RecordSet; // ========= STEP 3: Execute the analysis MatchLevelSummaryReportParameters parameters = new MatchLevelSummaryReportParameters(); // Set specific analysis parameters parameters.CustomerLayer = storeLayer; parameters.CustomerDescription = "stores"; // Set report options ReportOptions reportOptions = new ReportOptions(); reportOptions.ReportFormat = "PDF"; reportOptions.ReportHeader = new KeyValue[1]; reportOptions.ReportHeader[0] = new KeyValue(); reportOptions.ReportHeader[0].Key = "subtitle"; reportOptions.ReportHeader[0].Value = "Match Level Summary Report for two stores"; parameters.StandardReportOptions = reportOptions; // Set other parameters esriFolderItem outputReport = null; TaskResultOutput result = baServerHelper.MatchLevelSummaryReport(parameters, outputReport); // Get the report URL string reportURL = result.Reports[0].ReportURL; |