Skip to main content
Hello,

 

 

I am attempting to automate a report using FME.  I would like to take a feature class or shapefile and output a report of a table of the attributes.  I have found the TableAdder transformer and the PDFStyler transformer but I feel I am missing something.  Any suggestions on how to make this work?

 

Thanks.
Hi,

 

 

Try labelpointreplacer on the objects you want to have in your tabel. Then a boundingbox and boundsextractor (or just latter).

 

Enter in TableAdder

 

Max X Value:(@Value(_xmax)-@Value(_xmin))*@StringLength(@Value(_concatenated))

 

Selected Attributes: @Value(_concatenated)

 

Row Text Heigth: attribute to Label Heigth.

 

 

 

This should be ample size to fit your text. Of course this will vary on the font you choose (i think).

 

 

 

@Value(_concatenated) would be your tabelcontent (string, texxt, number)

 

Use can either use 1 or 2 instances of this writer, one for text and one for tablegrid for more control.

 

 

 


Btw, if you choose more attributes, the textadder automaticaly adds another colomn.

 

Also you probably have to find the longest object in each row to set the Max_X.

 

My example does not check the attribute(s) used as Title(s). You should do that of course..else you possibly get non fitting titles

 

 

 

I create these tabels using attributexploders, counters, listbuilders and such to build the grid geomtery and fill it with the data.

 

Then i create a paper space box for the pdf writer to put the table in.

 

I never used this custom TableAdder (did'nt even know there was one actually)

 

 

Check the fme readers and writers bible, pdf section how to do that.
Hi Robyn,

 

I would use the schema (any format) reader to get a list of all attributes and data types. explode them (ListExploder) and write into a xls using the fme_basename for the fanout. this way each xls tab will belong to one shape containing its attribute's names and data types.
If you are set on PDF then a more complicated approach will be necessary with the available PDF transformer, if possible wait untill the end of the week, then FME 2015 will be available with beter support for PDF writing.
Actually the TableAdder + PDFStyler combination with the my proposed method (schema reader + ListExpolder) works well.
THank you sorry I had to wait a while until I could come back to this.  When you say schema reader are you meaning a transformer such as AttributeExploder?

Reply