Packagecom.esri.aws.services
Interfacepublic interface IReport

Create demographic reports or print-quality thematic maps for a specified area in the United States. ArcWeb Services stores the generated report for 24 hours. If you want to view the report for longer than 24 hours, save a local copy of the report file. Based on ArcWeb Services Report web service. Requires ReportActivator in Framework.

View the examples.

See also

ReportActivator
http://www.arcwebservices.com/v2006/capabilities/report.do


Public Methods
 MethodDefined by
  
createPDFDocument(templateName:String, data:Array, responder:IResponder):void
Returns user-defined data in PDF format.
IReport
  
getAvailableTemplateNames(responder:IResponder):void
Returns template names to use with method createPDFDocument.
IReport
  
getCustomSiteReport(site:Site, reportOptions:ReportOptions, variables:Array, responder:IResponder):void
Returns a report with user-requested variables for a specified site.
IReport
  
getCustomStandardGeographyReport(standardGeographies:Array, reportOptions:ReportOptions, variables:Array, responder:IResponder):void
Returns a report containing user-requested variables for a specified standard geography.
IReport
  
getCustomVariables(variableDataSource:String, responder:IResponder):void
Returns a list of variables that can be used to create a custom report.
IReport
  
getDatabases(responder:IResponder):void
Returns a list of databases, such as Census 2000 or 2006/2011 Demographics, which contain tables of data for thematic mapping, spatial query and report services.
IReport
  
getGeographyIDs(geographyIDOptions:GeographyIDOptions, responder:IResponder):void
Returns geography ID information.
IReport
  
getReportHeaderKeys(methodName:String, responder:IResponder):void
Returns the key/value pairs for the header of the report based on the method name.
IReport
  
getSiteReports(site:Site, reportOptions:Array, combineReports:Boolean, responder:IResponder):void
Returns preformatted reports for a specified site.
IReport
  
getStandardGeographyReport(standardGeographies:Array, reportOptions:ReportOptions, responder:IResponder):void
Returns a preformatted report for specified standard geographies.
IReport
  
getTables(database:String, responder:IResponder):void
Returns a list of tables that contain individual data variables for use in thematic mapping, spatial query, and report services.
IReport
  
getThematicMapReport(site:Site, reportOptions:ReportOptions, thematicReportOptions:ThematicReportOptions, thematicVariable:String, responder:IResponder):void
Returns a thematic map in PDF format for a specified set of sites.
IReport
  
getThematicVariables(database:String, table:String, responder:IResponder):void
Returns a list of variables for a specified database and table.
IReport
  
searchThematicVariables(keyword:String, responder:IResponder):void
Returns the thematic variables based on a keyword search.
IReport
Method detail
createPDFDocument()method
public function createPDFDocument(templateName:String, data:Array, responder:IResponder):void

Returns user-defined data in PDF format.

Parameters
templateName:String — Use method getAvailableTemplateNames to get valid values.
 
data:Array — KeyValue parameters where the keys are the variable labels and the values are the data.
 
responder:IResponder — result/fault responder
getAvailableTemplateNames()method 
public function getAvailableTemplateNames(responder:IResponder):void

Returns template names to use with method createPDFDocument.

Parameters
responder:IResponder — result/fault responder
getCustomSiteReport()method 
public function getCustomSiteReport(site:Site, reportOptions:ReportOptions, variables:Array, responder:IResponder):void

Returns a report with user-requested variables for a specified site. You will be charged per variable. Use the method getCustomVariables to get a list of available variables.

Parameters
site:Site — Site parameters
 
reportOptions:ReportOptions — ReportOptions parameters
 
variables:Array — CustomReportVariables parameters
 
responder:IResponder — result/fault responder
getCustomStandardGeographyReport()method 
public function getCustomStandardGeographyReport(standardGeographies:Array, reportOptions:ReportOptions, variables:Array, responder:IResponder):void

Returns a report containing user-requested variables for a specified standard geography. You will be charged per variable. Use the method getCustomVariables to get a list of available variables, such as ZIP Code or state.

Parameters
standardGeographies:Array — StandardGeography parameters
 
reportOptions:ReportOptions — ReportOptions parameters
 
variables:Array — CustomReportVariables parameters
 
responder:IResponder — result/fault responder
getCustomVariables()method 
public function getCustomVariables(variableDataSource:String, responder:IResponder):void

Returns a list of variables that can be used to create a custom report.

Parameters
variableDataSource:String — dataSource parameter
 
responder:IResponder — result/fault responder
getDatabases()method 
public function getDatabases(responder:IResponder):void

Returns a list of databases, such as Census 2000 or 2006/2011 Demographics, which contain tables of data for thematic mapping, spatial query and report services. Use the output of getDatabases as the input for the method getTables.

Parameters
responder:IResponder — result/fault responder
getGeographyIDs()method 
public function getGeographyIDs(geographyIDOptions:GeographyIDOptions, responder:IResponder):void

Returns geography ID information. Use with the method getStandardGeographyReport in the parameter StandardGeography.geographyIDs.

Parameters
geographyIDOptions:GeographyIDOptions — GeographyIDOptions parameters
 
responder:IResponder — result/fault responder
getReportHeaderKeys()method 
public function getReportHeaderKeys(methodName:String, responder:IResponder):void

Returns the key/value pairs for the header of the report based on the method name. Use with the parameter ReportOptions.reportHeader and with the methods that returns a report (as ReportInfo): getCustomSiteReport, getCustomStandardGeographyReport, getStandardGeographyReport, and getThematicMapReport.

Parameters
methodName:String — "getCustomSiteReport", "getCustomStandardGeographyReport", "getStandardGeographyReport", and "getThematicMapReport".
 
responder:IResponder — result/fault responder

See also

getSiteReports()method 
public function getSiteReports(site:Site, reportOptions:Array, combineReports:Boolean, responder:IResponder):void

Returns preformatted reports for a specified site.

Parameters
site:Site — Site parameters
 
reportOptions:Array — ReportOptions parameters
 
combineReports:Boolean — true means data sources are combined into one PDF report; false means each data source is returned as a separate PDF report. Valid with PDF reports only.
 
responder:IResponder — result/fault responder
getStandardGeographyReport()method 
public function getStandardGeographyReport(standardGeographies:Array, reportOptions:ReportOptions, responder:IResponder):void

Returns a preformatted report for specified standard geographies.

Parameters
standardGeographies:Array — StandardGeography parameters
 
reportOptions:ReportOptions — ReportOptions parameters
 
responder:IResponder — result/fault responder
getTables()method 
public function getTables(database:String, responder:IResponder):void

Returns a list of tables that contain individual data variables for use in thematic mapping, spatial query, and report services. Use the output of getTables as an input for the method getThematicVariables.

Parameters
database:String — Use method getDatabases to get valid values.
 
responder:IResponder — result/fault responder
getThematicMapReport()method 
public function getThematicMapReport(site:Site, reportOptions:ReportOptions, thematicReportOptions:ThematicReportOptions, thematicVariable:String, responder:IResponder):void

Returns a thematic map in PDF format for a specified set of sites.

Parameters
site:Site — Site parameters
 
reportOptions:ReportOptions — ReportOptions parameters
 
thematicReportOptions:ThematicReportOptions — ThematicReportOptions parameters
 
thematicVariable:String — Use method getThematicVariables to get valid values.
 
responder:IResponder — result/fault responder
getThematicVariables()method 
public function getThematicVariables(database:String, table:String, responder:IResponder):void

Returns a list of variables for a specified database and table. Use the output of getThematicVariables as an input for the method getThematicMapReport.

Parameters
database:String — Use method getDatabases to get valid values.
 
table:String — Use method getTables to get valid values.
 
responder:IResponder — result/fault responder
searchThematicVariables()method 
public function searchThematicVariables(keyword:String, responder:IResponder):void

Returns the thematic variables based on a keyword search. Use the output of this method as an input for the method getThematicMapReport.

Parameters
keyword:String — A string with one or more letters. If the string is one or two letters, an exact search for the variable is made. If the string is three or more letters, a search for variables beginning with those letters is made.
 
responder:IResponder — result/fault responder
Examples
Basic_Report_getSiteReports
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns:awx="http://www.arcwebservices.com/2007/awx"
    pageTitle="Basic Site Demographic Report"
    implements="mx.rpc.IResponder"
    creationComplete="onComplete()"
    >
    <mx:Script>
        <![CDATA[
            import com.esri.aws.awx.geom.GeoPoint;
            import com.esri.aws.osgi.framework.ServiceTracker;
            import com.esri.aws.osgi.framework.IServiceReference;
            import com.esri.aws.services.IReport;
            import com.esri.aws.services.ReportInfo;
            import com.esri.aws.services.ReportOptions;
            import com.esri.aws.services.Site;
            import flash.utils.getQualifiedClassName;
            import mx.collections.ArrayCollection;
            import mx.controls.Alert;
            import mx.rpc.IResponder;

            private var m_report:ReportInfo;
            private var reportTracker:ServiceTracker;
            
            private function onComplete():void
            {
                reportTracker = new ServiceTracker(Framework.getInstance().systemContext, getQualifiedClassName(IReport));
                reportTracker.open();                
            }

            private function getSiteReport():void
            {
                var reportService:IReport = reportTracker.getService() as IReport;
                
                if (reportService)
                {                    
                    var site:Site = new Site();
                    site.siteLocation = new GeoPoint(-117.18908, 34.055219);
                    site.ringRadii = [2];
                    site.ringUnits = "miles";
                    site.siteName = "Location #1";
                    var rOptions:ReportOptions = new ReportOptions;
                    rOptions.dataSource = "ArcWeb:ESRI.TapestryAreaProfile.US";
                    rOptions.reportFormat='pdf';
                    reportService.getSiteReports(site,[rOptions],false,this);
                    m_info.htmlText = "Creating report ...";
                }
            }
            public function result(data:Object):void
            {
                var reports:ArrayCollection = ArrayCollection(data);
                m_report = reports.getItemAt(0) as ReportInfo;
                m_info.htmlText = "Site report in " + m_report.reportFormat + " format using the '" + m_report.dataSource
                                + "' data source:<br><u><a href='" + m_report.reportURL + "'>" + m_report.reportURL + "</a></u>";
            }
            public function fault(info:Object):void
            {
                Alert.show(info.toString());
            }
        ]]>
    </mx:Script>
    <awx:Framework id="m_framework" apiKey="[MY-API-KEY]">
        <awx:ReportActivator/>
    </awx:Framework>
    <mx:Button click="getSiteReport()" label="Click to create a 2-mile site report" fontSize="14" />
    <mx:Text id="m_info" fontSize="14" text=" "/>
</mx:Application>
Basic_Report_getStandardGeographyReport
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns:awx="http://www.arcwebservices.com/2007/awx"
    pageTitle="Basic Standard Geography Demographic Report"
    implements="mx.rpc.IResponder"
    creationComplete="onComplete()"
    >
    <mx:Script>
        <![CDATA[
            import com.esri.aws.osgi.framework.ServiceTracker;
            import com.esri.aws.services.ReportInfo;
            import com.esri.aws.services.ReportOptions;
            import com.esri.aws.services.StandardGeography;
            import com.esri.aws.services.IReport;
            import com.esri.aws.osgi.framework.IServiceReference;
            import flash.utils.getQualifiedClassName;
            import mx.controls.Alert;
            import mx.rpc.IResponder;

            private var reportTracker:ServiceTracker;
            
            private function onComplete():void
            {
                reportTracker = new ServiceTracker(Framework.getInstance().systemContext, getQualifiedClassName(IReport));
                reportTracker.open()
            }            

            private function getReport():void
            {
                var reportService:IReport = reportTracker.getService() as IReport;
                        
                if(reportService)
                {
                    var stdGeogs:StandardGeography = new StandardGeography;
                    stdGeogs.geographyLevel = 'zip';
                    stdGeogs.geographyIDs = ['92373'];
                    var rOptions:ReportOptions = new ReportOptions;
                    rOptions.dataSource = "ArcWeb:ESRI.TapestryAreaProfile.US";
                    reportService.getStandardGeographyReport([stdGeogs],rOptions,this);
                    m_info.htmlText = "Creating " + rOptions.reportFormat + " report ...";
                }
            }
            public function result(data:Object):void
            {
                var m_report:ReportInfo = ReportInfo(data);
                m_info.htmlText = "Report in " + m_report.reportFormat + " format using the '" + m_report.dataSource
                                + "' data source:<br><u><a href='" + m_report.reportURL + "'>" + m_report.reportURL + "</a></u>";
            }
            public function fault(info:Object):void
            {
                Alert.show(info.toString());
            }
        ]]>
    </mx:Script>
    <awx:Framework id="m_framework" apiKey="[MY-API-KEY]" >
        <awx:ReportActivator/>
    </awx:Framework>
    <mx:Button click="getReport()" label="Click to create a standard geography report" fontSize="14" />
    <mx:Text id="m_info" fontSize="14" text=" "/>
</mx:Application>