cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Correct HMTL for Table with Header Row - PDF Output

Hi,

I have a Flow integrated into my App that outputs html to a PDF, the problem is that the borders for the table header do not display correctly. This is my html code: 

<table width='100%' border='1' cellpadding='5' style='border: 1px solid black; border-collapse:collapse'>"&
"<tr style='background-color: #efefef'>
<th>Quantity</th>
<th>Description</th>
<th>Price Each</th>
<th>Total Price</th>
<th>Software</th>
</tr>
<tr> "& Concat(GalleryItemsDetails.AllItems,
"<td>" & DetailsItemQtyValue.Text & "</td>
<td>" & DetailsItemDetails.Text & "</td>
<td>" & DetailsItemCost.Text & "</td>
<td>" & DetailsLineValue.Text & "</td>
<td>" & DetailSoftwareDetails & "</td>","</td><tr>") &
"</table>

and this is what the output looks like:

 

mikiepat_0-1594749850964.png

 

can anyone tell me what i'm doing wrong?

 

thanks

 

Mike

 

1 REPLY 1
Highlighted
Super User
Super User

Re: Correct HMTL for Table with Header Row - PDF Output

@mikiepat 

Try taking the extra </td> out and also consider using the ForAll instead of Concat for your formula, like this:

"<table width='100%' border='1' cellpadding='5' style='border: 1px solid black; border-collapse:collapse'> 
   <tr style='background-color: #efefef'>
     <th>Quantity</th>
     <th>Description</th>
     <th>Price Each</th>
     <th>Total Price</th>
     <th>Software</th>
   </tr>" & 
      ForAll(GalleryItemsDetails.AllItems,
         "<tr>
            <td>" & DetailsItemQtyValue.Text & "</td>
            <td>" & DetailsItemDetails.Text & "</td>
            <td>" & DetailsItemCost.Text & "</td>
            <td>" & DetailsLineValue.Text & "</td>
            <td>" & DetailSoftwareDetails.Text & "</td>
          </tr>") &
"</table>"

 Also noticed that you referenced DetailsSoftwareDetails in your original formula.  I am assuming that is a text control also and needed the .Text

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,034)