I currently have a data driven page template set up which I manually cycle through and for each page run a Report Layout File (RLF) report and then add this to the ArcMap layout. The added element is then positioned on the legend to give additional data to the map user. The RLF draws it's data from the attribute table of a map layer that is not the DDP index layer.

I now want to automate the production of these maps. I have no problem with the scripting for the data driven page and exporting side of things, but not sure how to go about adding the report for each page before exporting.

Can anyone suggest if there is a way to do this?

I looked at arcpy.mapping.ExportReport but couldn't see how this works with bringing them back into the mxd and positioning them? It seems to be more for exporting standalone reports to later add to a book. Also the outputs were not quite the same as what the run report option within Arcmap produces, which is perfectly aligned to the size I need. They were either the wrong size, layout, or quality.

I also considered adding tables as is described here but don't want the grid lines to show.

1 Answer 1


I think you should put Data Driven Pages (DDP) to one side for now, because if that introduces any limitations to an application like this, they can usually be overcome by using a SearchCursor to iterate through the feature class that would have been your DDP index.

The key thing will be whether you can get ArcPy to run arcpy.mapping.ExportReport to run your pre-authored RLF file to create a TIF image that you can use as the source for a Picture Element on your layout.

The PictureElement object has a sourceImage property that allows you to read or modify the picture source location. If you plan on replacing a picture with pictures of different sizes and aspect ratios, author the map document with a picture that has a height and width set that represents the complete area you want all other pictures to occupy on the page layout. When a picture is replaced using the sourceImage property and has a different aspect ratio, it will be fit to the area of the original picture using the longest dimension. Replaced pictures will never be larger than the original authored size. You will also want to set the anchor position so that all new pictures are fit relative to that location. If you don't want pictures to be skewed, make sure the Preserve Aspect Ratio option is checked.

Once you can do this the remainder is relatively straightforward without DDP, and may or may not be possible with it.

  • 2
    Thanks for the suggestion. I had a quick look at this option now and there could be an issue of tif image quality, as when brought in as a PictureElement it was very pixellated. But perhaps if I change the size/layout of the RLF this may be overcome. I'll have a play around with it and see how it goes...
    – scoite
    Commented Aug 14, 2013 at 3:02
  • I'am currently facing this problem too. I authomatized via python the creation as the report and the tif is added to the layout than, now I'd like to automatically fit on my view. Any ideas?
    – buboreka
    Commented Jul 13, 2015 at 12:39
  • Follow the link to the ArcGIS resource on 'Picture Element' in PolyGeo's original answer. You can fit the picture in layout view using the elementPositionX & elementPositionY properties.
    – scoite
    Commented Jul 21, 2015 at 3:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.