cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kriscen
Helper I
Helper I

HTML to PDF. First column is missing

Hey Guys,

I created an App and in the end I wanted to have the result as a PDF. 

I created a Flow and everything is working absolutely fine while I'm in the editor mode and "using" the app while holding the "alt" button. But when I save the App and using it it the browser with my computer or in the Android App the whole 1st column is missing. 

My Code :

 

"<!DOCTYPE html>
<html>
<head>
<style>
Table {
  border-collapse: collapse;
  width: 100%;
  border=1 frame=void rules=rows
}

th, td {
  text-align: left;
  padding: 8px;
  
}

tr:nth-child(even){background-color: #f2f2f2}

th {
  background-color: #991D85;
  color: white;
}
</style>
</head>
<body>

<h1>Gebäudereinigung</h1>
<h3>Prüfprotokoll Qualitätskontrolle</h3>

<h4>
  Gebäude: "& DataCardValue17 &" <br>
  Etage: "& DataCardValue1 &" <br>
  Räume: "&  DataCardValue18 &"<br>
  Prüfer: "& DataCardValue190.Selected.DisplayName &"<br>
  Datum: "&  DataCardValue189 &"
</h4>
  <p>&nbsp;</p>
<table>
  <tr>
    <th>Frage</th>
    <th>Zustand</th>
    <th>Anmerkung</th>
    <th>Nachbesserungsdatum</th>
  </tr> 
  <tr>
    <th>Büro/ Besprechung </th>
    <th> </th>
    <th> </th>
    <th> </th>
  </tr>  
  <tr>
    <td>"& DataCardKey21 &"</td>
    <td>"& DataCardValue21.Selected.Value &"</td>
    <td>"& DataCardValue22 &"</td>
    <td>"& DataCardValue26.SelectedDate & "</td>
  </tr>
  <tr>
    <td>"& DataCardKey24 &"</td>
    <td>"& DataCardValue24.Selected.Value &"</td>
    <td>"& DataCardValue25 &"</td>
    <td>"& DataCardValue29.SelectedDate &"</td>
  </tr>
  <tr>
    <td>"& DataCardKey27 &"</td>
    <td>"& DataCardValue27.Selected.Value &"</td>
    <td>"& DataCardValue28 &"</td>
    <td>"& DataCardValue23.SelectedDate &"</td>
  </tr>
  <tr>
    <td>"& DataCardKey30 &"</td>
    <td>"& DataCardValue30.Selected.Value &"</td>
    <td>"& DataCardValue31 &"</td>
    <td>"& DataCardValue32.SelectedDate &"</td>
  </tr>
  <tr>
    <td>"& DataCardKey33 &"</td>
    <td>"& DataCardValue33.Selected.Value &"</td>
    <td>"& DataCardValue34 &"</td>
    <td>"& DataCardValue35.SelectedDate &"</td>
  </tr>
  <tr>
    <td>"& DataCardKey36 &"</td>
    <td>"& DataCardValue36.Selected.Value &"</td>
    <td>"& DataCardValue37 &"</td>
    <td>"& DataCardValue38.SelectedDate &"</td>
  </tr> 
  <tr>
    <th>Sanitär/ Umkleide/ Küche/ Pausenraum </th>
    <th> </th>
    <th> </th>
    <th> </th>
  </tr>  
  <tr>
    <td>"& DataCardKey39 &"</td>
    <td>"& DataCardValue39.Selected.Value &"</td>
    <td>"& DataCardValue40 &"</td>
    <td>"& DataCardValue41.SelectedDate &"</td>
  </tr>
  <tr>
    <td>"& DataCardKey185 &"</td>
    <td>"& DataCardValue185.Selected.Value &"</td>
    <td>"& DataCardValue42 &"</td>
    <td>"& DataCardValue43.SelectedDate &"</td>
  </tr>
  <tr>
    <td>"& DataCardKey44 &"</td>
    <td>"& DataCardValue44.Selected.Value &"</td>
    <td>"& DataCardValue45 &"</td>
    <td>"& DataCardValue46.SelectedDate &"</td>
  </tr>
  <tr>
    <td>"& DataCardKey47 &"</td>
    <td>"& DataCardValue47.Selected.Value &"</td>
    <td>"& DataCardValue48 &"</td>
    <td>"& DataCardValue49.SelectedDate &"</td>
  </tr>
  <tr>
    <td>"& DataCardKey50 &"</td>
    <td>"& DataCardValue50.Selected.Value &"</td>
    <td>"& DataCardValue51 &"</td>
    <td>"& DataCardValue52.SelectedDate &"</td>
  </tr>
  <tr>
    <td>"& DataCardKey53 &"</td>
    <td>"& DataCardValue53.Selected.Value &"</td>
    <td>"& DataCardValue54 &"</td>
    <td>"& DataCardValue55.SelectedDate &"</td>
  </tr>
  <tr>
    <td>"& DataCardKey56 &"</td>
    <td>"& DataCardValue56.Selected.Value &"</td>
    <td>"& DataCardValue57 &"</td>
    <td>"& DataCardValue58.SelectedDate &"</td>
  </tr>
  <tr>
    <td>"& DataCardKey59 &"</td>
    <td>"& DataCardValue59.Selected.Value &"</td>
    <td>"& DataCardValue60 &"</td>
    <td>"& DataCardValue61.SelectedDate &"</td>
  </tr>
  <tr>
    <td>"& DataCardKey62 &"</td>
    <td>"& DataCardValue62.Selected.Value &"</td>
    <td>"& DataCardValue63 &"</td>
    <td>"& DataCardValue64.SelectedDate &"</td>
  </tr>
  <tr>
    <td>"& DataCardKey65 &"</td>
    <td>"& DataCardValue65.Selected.Value &"</td>
    <td>"& DataCardValue66 &"</td>
    <td>"& DataCardValue67.SelectedDate &"</td>
  </tr>
  <tr>
    <td>"& DataCardKey68 &"</td>
    <td>"& DataCardValue68.Selected.Value &"</td>
    <td>"& DataCardValue69 &"</td>
    <td>"& DataCardValue70.SelectedDate &"</td>
  </tr>
  <tr>
    <td>"& DataCardKey71 &"</td>
    <td>"& DataCardValue71.Selected.Value &"</td>
    <td>"& DataCardValue72 &"</td>
    <td>"& DataCardValue73.SelectedDate &"</td>
  </tr>
    <tr>
    <th>Verkehrswege/ Treppenhaus/ Aufzug/ Lift </th>
    <th> </th>
    <th> </th>
    <th> </th>
    </tr>
  <tr>
    <td>"& DataCardKey74 &"</td>
    <td>"& DataCardValue74.Selected.Value &"</td>
    <td>"& DataCardValue75 &"</td>
    <td>"& DataCardValue76.SelectedDate &"</td>
  </tr>
  <tr>
    <td>"& DataCardKey77 &"</td>
    <td>"& DataCardValue77.Selected.Value &"</td>
    <td>"& DataCardValue78 &"</td>
    <td>"& DataCardValue79.SelectedDate &"</td>
  </tr>
  <tr>
    <td>"& DataCardKey80 &"</td>
    <td>"& DataCardValue80.Selected.Value &"</td>
    <td>"& DataCardValue81 &"</td>
    <td>"& DataCardValue82.SelectedDate &"</td>
  </tr>
  <tr>
    <td>"& DataCardKey83 &"</td>
    <td>"& DataCardValue83.Selected.Value &"</td>
    <td>"& DataCardValue84 &"</td>
    <td>"& DataCardValue85.SelectedDate &"</td>
  </tr>
  <tr>
    <td>"& DataCardKey86 &"</td>
    <td>"& DataCardValue86.Selected.Value &"</td>
    <td>"& DataCardValue87 &"</td>
    <td>"& DataCardValue88.SelectedDate &"</td>
  </tr>
  <tr>
    <td>"& DataCardKey89 &"</td>
    <td>"& DataCardValue89.Selected.Value &"</td>
    <td>"& DataCardValue90 &"</td>
    <td>"& DataCardValue91.SelectedDate &"</td>
  </tr>
  <tr>
    <td>"& DataCardKey92 &"</td>
    <td>"& DataCardValue92.Selected.Value &"</td>
    <td>"& DataCardValue93 &"</td>
    <td>"& DataCardValue94.SelectedDate &"</td>
  </tr>
</table>

</body>
</html>
"

 

I alredy tried to figure out whats the problem and when i just paste normal text e.g. the DataCardKey39 but in "DataCardKey39"  in the first column it works ?!?!

 

Hope somebody can help me

 

Thanks in advance for your guidance!

 

Christan

 

1 ACCEPTED SOLUTION

Accepted Solutions

Also didn't work out.
I replaced the 'DataCardKey24' with the Question that is in the label and now it works fine
thank you 

View solution in original post

4 REPLIES 4
RandyHayes
Super User III
Super User III

@Kriscen 

DataCardKeyx is a control, it is not a property with a text value.  If you want to get the text of that label, you need to use DataCardKey39.Text (and all the rest need adjustment as well) in your formula.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

I tryed it out with DataCardKey39.Text but it didnt work out

RandyHayes
Super User III
Super User III

@Kriscen 

What happens if you shorten down your html...perhaps to something like this:

"<!DOCTYPE html>
<html>
<head>
<style>
Table {
  border-collapse: collapse;
  width: 100%;
  border=1 frame=void rules=rows
}

th, td {
  text-align: left;
  padding: 8px;
  
}

tr:nth-child(even){background-color: #f2f2f2}

th {
  background-color: #991D85;
  color: white;
}
</style>
</head>
<body>

<h1>Gebäudereinigung</h1>
<h3>Prüfprotokoll Qualitätskontrolle</h3>

<h4>
  Gebäude: "& DataCardValue17 &" <br>
  Etage: "& DataCardValue1 &" <br>
  Räume: "&  DataCardValue18 &"<br>
  Prüfer: "& DataCardValue190.Selected.DisplayName &"<br>
  Datum: "&  DataCardValue189 &"
</h4>
  <p>&nbsp;</p>
<table>
  <tr>
    <th>Frage</th>
    <th>Zustand</th>
    <th>Anmerkung</th>
    <th>Nachbesserungsdatum</th>
  </tr> 
  <tr>
    <th>Büro/ Besprechung </th>
    <th> </th>
    <th> </th>
    <th> </th>
  </tr>  
  <tr>
    <td>"& DataCardKey21.Text &"</td>
    <td>"& DataCardValue21.Selected.Value &"</td>
    <td>"& DataCardValue22.Text &"</td>
    <td>"& DataCardValue26.SelectedDate & "</td>
  </tr>
  <tr>
    <td>"& DataCardKey24.Text &"</td>
    <td>"& DataCardValue24.Selected.Value &"</td>
    <td>"& DataCardValue25.Text &"</td>
    <td>"& DataCardValue29.SelectedDate &"</td>
  </tr>
</table>

</body>
</html>
"

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Also didn't work out.
I replaced the 'DataCardKey24' with the Question that is in the label and now it works fine
thank you 

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,284)