Skip to main content
Question

HTMLReportGenerator - Column Width - Output to an email


juliarozema
Contributor
Forum|alt.badge.img+7

What I am doing: I am creating a QC process on our dataset. On a regular basis (daily or weekly) the job will run and I want to email the last person who edited that record to tell them the error that was introduced so that they can go back and rectify the error.

 

 

SCENARIO 1: I am using the HTMLReportGenerator to create a report that can get emailed. It is a simple report. The HTMLReportGenerator settings are:

 

- Page Contents - one Table

 

- Table Content Settings - Two Columns

This output goes into a EMAILER and sends me a test email. Everything I need is in the email but the columns are a bad width causing the information to get squished.

 

My Question: How do I control the width of the two columns?

 

SCENARIO 2: I turned the Page Contents into a Custom HTML. The problem here is I don't know how to write HTML. So, I found the HTML output from Scenario 1 and added in two lines of HTML that adjust the columns width, but I don't know how to get FME to read in more than just the first record of data. Below is the HTML that I tried. Please let me know how I can adjust this HTML so that it knows to read all the incoming records. Something else that would also be helpful is being able to see the HTML that FME is already using to generate the table that I started with in SCENARIO 1. If I knew what that HTML is I could add in the col width lines.

Thank you in advance for your time,

<!DOCTYPE html>

 

<html>

 

<head>

 

<title>Report</title>

 

<meta charset="UTF-8">

 

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">

 

</head>

 

<body>

 

<table class="table table-bordered">

 

<thead>

 

<col width="200">

 

<col width="100">

 

<tr>

 

<th>EDITOR &amp; ERRORS</th>

 

<th>MSLINK</th>

 

</tr>

 

</thead>

 

<tbody>

 

<tr>

 

<td>@Value(EDITORS_ERROR)</td>

 

<td>@Value(_mslink_concat)</td>

 

</tr>

 

</tbody>

 

</table>

 

</body>

 

</html>

 

4 replies

juliarozema
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • January 18, 2019

@DebbiAtSafe


stalknecht
Contributor
Forum|alt.badge.img+19
  • Contributor
  • January 20, 2019

You can use the StringReplacer on the html_content attribute to replace the string "<thead>" with "<thead><col width="200"><col width="100">" good luck


itay
Supporter
Forum|alt.badge.img+17
  • Supporter
  • January 23, 2019
stalknecht wrote:

You can use the StringReplacer on the html_content attribute to replace the string "<thead>" with "<thead><col width="200"><col width="100">" good luck

@juliarozema, the way @stalknecht is describing is how I would do it...


juliarozema
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • January 23, 2019

Hey @stalknecht & @itay. Thank you for your idea. This makes sense. I will give that a go.

 

 

Another work around was that I added underscores to the header names making them wider. For example: ______MSLINK_______

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