FRAMES | NO FRAMES
ReportFromProfile Method

Creates Tapestry Segmentation Report from a segmentation profile.

Availability: Business Analyst Server.

TaskResultOutput ReportFromProfile ( 
    ReportFromProfileParameters  Parameters, 
    esriReportFormat             ReportFormat, 
    TaskOutputType[]             OutputTypes, 
    esriFolderItem               OutputReportItem 
);

Parameter Description
Parameters Configuration options for analysis. Type ReportFromProfileParameters.
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.

Returns

Variable of type TaskResultOutput

Examples

The example below creates a study area consisting of Dallas County. It then analyzes the area and generates a market segmentation profile and report of the study area.

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
 
// You can specify below a domain of your local Business Analyst Server.
//baServerHelper.BAServerDomain = "esri.com";
 
// If a domain name is specified, a local server name in output URLs is replaced with the
// fully-addressable server name so people and machines outside the domain of your local
// Business Analyst Server instance can access these URLs.
 
RenderingParameters imageOptions;
TaskOutputType[] outputOptions;
esriFolderItem outputLayer;
esriFolderItem outputReport;
 
// ========= STEP 1: Create a boundary layer from standard geographies
 
// The San Francisco County study area is selected as the boundary.
StandardLevelsOfGeographyParameters geographyParameters = new StandardLevelsOfGeographyParameters();
 
// Set specific analysis parameters
geographyParameters.GeographyFeaturesBehavior = esriStdGeographyType.esriStdGeographyTypeFirst;
geographyParameters.GeographyIDs = new string[] { "06075" }; // FIPS ID code for San Francisco County
geographyParameters.GeographyLevelID = "US.Counties";
 
// Set other parameters
imageOptions = null;
outputOptions = new TaskOutputType[] { TaskOutputType.GetFeatureClass };
outputLayer = null;
outputReport = null;
 
TaskResultOutput geographyResult =
    baServerHelper.StandardLevelsOfGeography(geographyParameters, imageOptions, outputOptions, outputLayer, outputReport);
 
DataLayer boundaryLayer = new DataLayer();
boundaryLayer.RecordSet = geographyResult.RecordSet;
 
// ========= STEP 2: Create a segmentation profile by the boundary layer
 
ProfileByAreaSummationParameters profileParameters = new ProfileByAreaSummationParameters();
 
// Set specific analysis parameters
profileParameters.AreaIDField = "AREA_ID";
profileParameters.Boundaries = boundaryLayer;
profileParameters.SegmentationBase = "Total Households";
 
// Set other parameters
// In general, a non-null esriFolderItem is specified to save a newly-created
// item to the server-side repository or to reference an existing item in it.
esriFolderItem outputItem = new esriFolderItem();
outputItem.folderType = esriFolderType.esriFolderSegProfiles;
outputItem.itemName = "segProfile_ReportFromProfile";
outputItem.projectName = "Default Project";
outputItem.workspaceName = "Default Workspace";
 
string profileResult = baServerHelper.ProfileByAreaSummation(profileParameters, outputItem);
 
ProfileData profileData = new ProfileData();
profileData.Description = profileResult;
 
// ========= STEP 3: Execute the analysis
 
ReportFromProfileParameters parameters = new ReportFromProfileParameters();
 
// Set specific analysis parameters
parameters.Profile = profileData;
 
// 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 = "Report from Profile for San Francisco County";
parameters.StandardReportOptions = reportOptions;
 
// Set other parameters
outputReport = null;
 
TaskResultOutput result = baServerHelper.ReportFromProfile(parameters, outputReport);
 
string reportURL = result.Reports[0].ReportURL;

See Also