Simple Report Header Question?

1655
3
Jump to solution
01-19-2012 11:30 AM
MichaelSnook
Occasional Contributor III
How does one add custom values in the report headers based on attributes in the point locations that are used to create the reports?  For instance I have an address attached to the point that I'm sending to the Drive Time reports generator.  I would like that address to be displayed in one of the custom fields ---> ("address": "[address+field"])  but there is no concrete example of the correct syntax that I can find.

Thanks!
0 Kudos
1 Solution

Accepted Solutions
TonyHowser
Esri Contributor
The Business Analyst Online API Drive Time and Simple Rings services allow you to generate ring and network-based study/service areas from one or more input points (map locations) while, simultaneously, allowing you to generate PDF/Excel/XML-based reports which summarize and describe demographic, psychographic, consumer behavior, and other characteristics of the underlying populations of those generated areas.

In your question, you are asking if you can associate something like an identifier within the attributes of your input points which can be associated with the customizable report header fields on a "point-by-point" basis.

Currently, the Drive Time and Simple Rings services give the user/client the option to specify customizable content in certain report header fields on a "report-by-report" basis but; not, unfortunately, on an input point-by-point basis. In the context of your question, this, effectively, means that, regardless of the number of input points submitted in a single Drive Time of Simple Rings service request, the customizable report header fields will stay the same. In this sense, they are "static" customizable report header field values.

This is a great idea and I'm sorry to say that we don't currently support it as described. We will definitely record this in our list of user-requested features/functionality.

In the meantime, I can offer you a few options:

1. Leverage the available "static" report headers:

You can retrieve the list of customizable report header field names available with your subscription by submitting a Get Report Templates service request. The service will return some simple metadata which will describe the customizable field names (the "headers" property) available with your subscription with each report.

Here are a couple of sample requests which create a Demographic and Income Report based on the drive time and ring-based (ring buffer) areas, respectively from two different input points. Additionally, several available custom ("static") report headers values have been specified:

http://baoapi.esri.com/rest/report/DriveTime?DistanceUnits=esriDriveTimeUnitsMinutes&f=pjson&Radii=1;2&Stores={"RecordSet":{"geometryType":"esriGeometryPoint","spatialReference":{"wkid":4326},"features":[{"geometry":{"x":-117.183289,"y":34.074962,"spatialReference":{"wkid":4326}},"attributes":{"STORE_ID":"1"}},{"geometry":{"x":-117.189080,"y":34.045258,"spatialReference":{"wkid":4326}},"attributes":{"STORE_ID":"2"}}]},"SpatialReference":{"wkid":4326}}&TaskOutputType=GetReport;GetFeatureClass&StoreIDField=STORE_ID&ReportOptions=[{"TemplateName":"dandi","ReportFormat":"PDF","ReportHeader":[{"Key":"locationname","Value":"[custom+locationname+value]"},{"Key":"address","Value":"[custom+address+value]"},{"Key":"areadescription","Value":"[custom+areadescription+value]"},{"Key":"title","Value":"[custom+title+value]"},{"Key":"subtitle","Value":"[custom+subtitle+value]"}]}]&Token=4vLrwJWpa83bDyB29D8ZW_ecFa_gsFMSG90fT-eds8EDJbihreeGHZhvVsEX9QAvZDVm&


(Click HERE to run this request on our demo server.)


http://baoapi.esri.com/rest/report/SimpleRings?DistanceUnits=esriMiles&f=pjson&Radii=1;2&Stores={"RecordSet":{"geometryType":"esriGeometryPoint","spatialReference":{"wkid":4326},"features":[{"geometry":{"x":-117.183289,"y":34.074962,"spatialReference":{"wkid":4326}},"attributes":{"STORE_ID":"1"}},{"geometry":{"x":-117.189080,"y":34.045258,"spatialReference":{"wkid":4326}},"attributes":{"STORE_ID":"2"}}]},"SpatialReference":{"wkid":4326}}&TaskOutputType=GetReport;GetFeatureClass&StoreIDField=STORE_ID&ReportOptions=[{"TemplateName":"dandi","ReportFormat":"PDF","ReportHeader":[{"Key":"locationname","Value":"[custom+locationname+value]"},{"Key":"address","Value":"[custom+address+value]"},{"Key":"areadescription","Value":"[custom+areadescription+value]"},{"Key":"title","Value":"[custom+title+value]"},{"Key":"subtitle","Value":"[custom+subtitle+value]"}]}]&Token=4vLrwJWpa83bDyB29D8ZW_ecFa_gsFMSG90fT-eds8EDJbihreeGHZhvVsEX9QAvZDVm&


(Click HERE to run this request on our demo server.)


2. Associate multiple input points with the corresponding latitude and longitude values.

The latitude and longitude values listed on the top of each of the output reports correspond to the values in each input point submitted in the associated Drive Time and Simple Rings requests.


3. Submit a single input point per Drive Time and Simple Rings request and leverage the available "static" customizable header fields as described above.

By doing this, you can place the address (or other identifier associated with the input point) in one or more of the available fields.

Thank you for your question (and suggestion)!
Tony

View solution in original post

0 Kudos
3 Replies
TonyHowser
Esri Contributor
The Business Analyst Online API Drive Time and Simple Rings services allow you to generate ring and network-based study/service areas from one or more input points (map locations) while, simultaneously, allowing you to generate PDF/Excel/XML-based reports which summarize and describe demographic, psychographic, consumer behavior, and other characteristics of the underlying populations of those generated areas.

In your question, you are asking if you can associate something like an identifier within the attributes of your input points which can be associated with the customizable report header fields on a "point-by-point" basis.

Currently, the Drive Time and Simple Rings services give the user/client the option to specify customizable content in certain report header fields on a "report-by-report" basis but; not, unfortunately, on an input point-by-point basis. In the context of your question, this, effectively, means that, regardless of the number of input points submitted in a single Drive Time of Simple Rings service request, the customizable report header fields will stay the same. In this sense, they are "static" customizable report header field values.

This is a great idea and I'm sorry to say that we don't currently support it as described. We will definitely record this in our list of user-requested features/functionality.

In the meantime, I can offer you a few options:

1. Leverage the available "static" report headers:

You can retrieve the list of customizable report header field names available with your subscription by submitting a Get Report Templates service request. The service will return some simple metadata which will describe the customizable field names (the "headers" property) available with your subscription with each report.

Here are a couple of sample requests which create a Demographic and Income Report based on the drive time and ring-based (ring buffer) areas, respectively from two different input points. Additionally, several available custom ("static") report headers values have been specified:

http://baoapi.esri.com/rest/report/DriveTime?DistanceUnits=esriDriveTimeUnitsMinutes&f=pjson&Radii=1;2&Stores={"RecordSet":{"geometryType":"esriGeometryPoint","spatialReference":{"wkid":4326},"features":[{"geometry":{"x":-117.183289,"y":34.074962,"spatialReference":{"wkid":4326}},"attributes":{"STORE_ID":"1"}},{"geometry":{"x":-117.189080,"y":34.045258,"spatialReference":{"wkid":4326}},"attributes":{"STORE_ID":"2"}}]},"SpatialReference":{"wkid":4326}}&TaskOutputType=GetReport;GetFeatureClass&StoreIDField=STORE_ID&ReportOptions=[{"TemplateName":"dandi","ReportFormat":"PDF","ReportHeader":[{"Key":"locationname","Value":"[custom+locationname+value]"},{"Key":"address","Value":"[custom+address+value]"},{"Key":"areadescription","Value":"[custom+areadescription+value]"},{"Key":"title","Value":"[custom+title+value]"},{"Key":"subtitle","Value":"[custom+subtitle+value]"}]}]&Token=4vLrwJWpa83bDyB29D8ZW_ecFa_gsFMSG90fT-eds8EDJbihreeGHZhvVsEX9QAvZDVm&


(Click HERE to run this request on our demo server.)


http://baoapi.esri.com/rest/report/SimpleRings?DistanceUnits=esriMiles&f=pjson&Radii=1;2&Stores={"RecordSet":{"geometryType":"esriGeometryPoint","spatialReference":{"wkid":4326},"features":[{"geometry":{"x":-117.183289,"y":34.074962,"spatialReference":{"wkid":4326}},"attributes":{"STORE_ID":"1"}},{"geometry":{"x":-117.189080,"y":34.045258,"spatialReference":{"wkid":4326}},"attributes":{"STORE_ID":"2"}}]},"SpatialReference":{"wkid":4326}}&TaskOutputType=GetReport;GetFeatureClass&StoreIDField=STORE_ID&ReportOptions=[{"TemplateName":"dandi","ReportFormat":"PDF","ReportHeader":[{"Key":"locationname","Value":"[custom+locationname+value]"},{"Key":"address","Value":"[custom+address+value]"},{"Key":"areadescription","Value":"[custom+areadescription+value]"},{"Key":"title","Value":"[custom+title+value]"},{"Key":"subtitle","Value":"[custom+subtitle+value]"}]}]&Token=4vLrwJWpa83bDyB29D8ZW_ecFa_gsFMSG90fT-eds8EDJbihreeGHZhvVsEX9QAvZDVm&


(Click HERE to run this request on our demo server.)


2. Associate multiple input points with the corresponding latitude and longitude values.

The latitude and longitude values listed on the top of each of the output reports correspond to the values in each input point submitted in the associated Drive Time and Simple Rings requests.


3. Submit a single input point per Drive Time and Simple Rings request and leverage the available "static" customizable header fields as described above.

By doing this, you can place the address (or other identifier associated with the input point) in one or more of the available fields.

Thank you for your question (and suggestion)!
Tony
0 Kudos
MichaelSnook
Occasional Contributor III
Thanks for the response Tony...not the answer I was hoping for but at least I know that it's not currently possible.

In a previous implementation I was using your method #3 to create a separate report request for each point and add the 'Address' to the header.  It seems to be a much more efficient way to lump all of the subject points into one server request (for both handling the response as well as managing the resulting report) on the client side.

I hope to see this in a future release!

Thanks again!
0 Kudos
TonyHowser
Esri Contributor
Thanks for your reply.

Again, your feedback has been noted and; yes, you will experience better overall performance by analyzing "chunks" of locations together.

Thanks again!
Tony
0 Kudos