AnsweredAssumed Answered

Help with looping

Question asked by sconlon on Aug 29, 2012
Latest reply on Aug 31, 2012 by jskinner-esristaff
Hello,      I'm new to arcmapping and modelbuilder. My first task was create a model (fig 1) to run thru a .gdb, check for a certain field, then run the frequency tool, and output the resulting table to a different .gdb. It works exactly as I want it. Now I want to take each those tables (about 50 of them) and create a report (.rlf) and export it to PDF. The code below, which I've loaded as a script into a toolbox, works correctly but only one table at a time. How can I (1) loop it thru each table? and (2) not overwrite the previous PDF?
Ultimately I want to insert it to the first model ( Fig 1)

Any help or suggestions would be greatly appreciated

import arcpy  cttable=arcpy.mapping.TableView(r"C:\Workspace\CaseTypeTables.gdb\AGR_SET_RECON_LN_case_types") arcpy.mapping.ExportReport(cttable,r"C:\Workspace\working\LAS_case-type_report.rlf",r"C:\Workspace\working\successPDFreport.pdf") del cttable

Attachments

Outcomes