Skip to main content
Question

HTML writer Fanout with fme_basename


Forum|alt.badge.img

I am using two HTML Report Generator and then combining both with HTML Layouter, after the HTML Layouter using Logger, i am not able to see "fme_basename" value hence my writer is not able to use "fme_basename" value in Fanout Expression.

Attaching screenshot for more clarity.

5 replies

redgeographics
Celebrity
Forum|alt.badge.img+49

The HTMLReportGenerator strips all attributes and adds html_content, the HTML writer only supports html_content as attribute, so it looks like you're out of luck.

However...

If you merge one of the orginal features to the output of the HTMLReportGenerator using the FeatureMerger and use a FeatureWriter instead of the regular HTML writer you can propagate the fme_basename attribute and use it as the output name.


chrishoh
Forum|alt.badge.img+1
  • September 13, 2018

@redgeographics

Is it possible to do a Data-fanout after the html-content entered the HTML-Layouter?

Using this examle, I want to generate 80 html-documents - one report for each of the parks.


xiaomengatsafe
Safer
Forum|alt.badge.img+3
chrishoh wrote:

@redgeographics

Is it possible to do a Data-fanout after the html-content entered the HTML-Layouter?

Using this examle, I want to generate 80 html-documents - one report for each of the parks.

Hi @chrishoh, Did you mean to attach an example? I'm guessing your incoming data has an park name attribute. You can try using the park name attribute in the Group By parameter. This will create one HTML page for each park, and preserve park name attribute on the HTMLReportGenerator's output. And you should be able to use park name to fanout the output.

 

Hope that helps. Cheers,

 


chrishoh
Forum|alt.badge.img+1
  • September 14, 2018
xiaomengatsafe wrote:
Hi @chrishoh, Did you mean to attach an example? I'm guessing your incoming data has an park name attribute. You can try using the park name attribute in the Group By parameter. This will create one HTML page for each park, and preserve park name attribute on the HTMLReportGenerator's output. And you should be able to use park name to fanout the output.

 

Hope that helps. Cheers,

 

But there is no Group By Parameter in HTMLReportGenerator? (FME2017)

 

 


xiaomengatsafe
Safer
Forum|alt.badge.img+3
chrishoh wrote:
But there is no Group By Parameter in HTMLReportGenerator? (FME2017)

 

 

Hi @chrisho. Ah, yes, although HTMLReportGenerator support the Group By parameter, the HTMLLayouter doesn't. Seeing the screenshot of your workflow helps a lot in understanding the scenario!

 

There is a secret trick to add group by parameter to transformers that don't have them. See this Q&A; for details about this Hack. Hopefully it will solve your problem.

 

Cheers

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings