cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

PRINTING HTML NOT WORKING - HELP PLEASE!

Hey guys, I make a powerapps button flow to print a HTML text on PowerApps, but did not work so well...

 

I got this code on HTML text:

 

"<DOCTYPE html>
<html>
<head>
</head>
<body>
<Table>
<tr>" & If(    IsBlank('lblGE - SUP - GPL');                "";"<td> GE - SUP - GPL </td><td>" & "$ " & 'lblGE - SUP - GPL') & "</td></tr>
<tr>" & If(    IsBlank('lblGE - SUP - NOVAS OP');           "";"<td> GE - SUP - NOVAS OP </td><td>" & "$ " & 'lblGE - SUP - NOVAS OP') & "</td></tr>
<tr>" & If(    IsBlank('lblGE - OP - INTERNO');             "";"<td> GE - OP - INTERNO </td><td>" & "$ " & 'lblGE - OP - INTERNO') & "</td></tr>
<tr>" & If(    IsBlank('lblGE - COM - INTERNO');            "";"<td> GE - COM - INTERNO </td><td>" & "$ " & 'lblGE - COM - INTERNO') & "</td></tr>
<tr>" & If(    IsBlank('lblGE - PMO - INTERNO');            "";"<td> GE - PMO - INTERNO </td><td>" & "$ " & 'lblGE - PMO - INTERNO') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - INT - INTERNO');            "";"<td> BA - INT - INTERNO </td><td>" & "$ " & 'lblBA - INT - INTERNO') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - CAC - CRED');               "";"<td> BA - CAC - CRED </td><td>" & "$ " & 'lblBA - CAC - CRED') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - LOC - EMPR SOC');           "";"<td> BA - LOC - EMPR SOC </td><td>" & "$ " & 'lblBA - LOC - EMPR SOC') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - CAC - IG');                 "";"<td> BA - CAC - IG </td><td>" & "$ " & 'lblBA - CAC - IG') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - CAC - C INOV LB');          "";"<td> BA - CAC - C INOV LB </td><td>" & "$ " & 'lblBA - CAC - C INOV LB') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - CAC - C INOV PF');          "";"<td> BA - CAC - C INOV PF </td><td>" & "$ " & 'lblBA - CAC - C INOV PF') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - CAC - DECRE CAB');          "";"<td> BA - CAC - DECRE CAB </td><td>" & "$ " & 'lblBA - CAC - DECRE CAB') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - CAC - POVOS MA');           "";"<td> BA - CAC - POVOS MA </td><td>" & "$ " & 'lblBA - CAC - POVOS MA') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - CAC - LID SEBRE');          "";"<td> BA - CAC - LID SEBRE </td><td>" & "$ " & 'lblBA - CAC - LID SEBRE') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - CAC - ACESS MER');          "";"<td> BA - CAC - ACESS MER </td><td>" & "$ " & 'lblBA - CAC - ACESS MER') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - CAC - FUNDO');              "";"<td> BA - CAC - FUNDO </td><td>" & "$ " & 'lblBA - CAC - FUNDO') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - CITE - PL SOBR');          "";"<td> NAC - CITE - PL SOBR </td><td>" & "$ " & 'lblNAC - CITE - PL SOBR') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - CITE - PL 3 LA');          "";"<td> NAC - CITE - PL 3 LA </td><td>" & "$ " & 'lblNAC - CITE - PL 3 LA') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - CITE - PL RMRJ');          "";"<td> NAC - CITE - PL RMRJ </td><td>" & "$ " & 'lblNAC - CITE - PL RMRJ') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - CAC - C INOV PF');          "";"<td> BA - CAC - C INOV PF </td><td>" & "$ " & 'lblBA - CAC - C INOV PF') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - CITE - ALIANCE');          "";"<td> NAC - CITE - ALIANCE </td><td>" & "$ " & 'lblNAC - CITE - ALIANCE') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - CITE - ALIANCE');          "";"<td> NAC - CITE - ALIANCE </td><td>" & "$ " & 'lblNAC - CITE - ALIANCE') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - CITE - EM MOVI');          "";"<td> NAC - CITE - EM MOVI </td><td>" & "$ " & 'lblNAC - CITE - EM MOVI') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - CITE - RAPS');             "";"<td> NAC - CITE - RAPS </td><td>" & "$ " & 'lblNAC - CITE - RAPS') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - CLI - BAHIA');             "";"<td> NAC - CLI - BAHIA </td><td>" & "$ " & 'lblNAC - CLI - BAHIA') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - CLI - BOLSA FLOREST');     "";"<td> NAC - CLI - BOLSA FLOREST </td><td>" & "$ " & 'lblNAC - CLI - BOLSA FLOREST') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - CLI - FUNDO RESERVA');     "";"<td> NAC - CLI - FUNDO RESERVA </td><td>" & "$ " & 'lblNAC - CLI - FUNDO RESERVA') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - CLI - INSTITUCIONAL');     "";"<td> NAC - CLI - INSTITUCIONAL </td><td>" & "$ " & 'lblNAC - CLI - INSTITUCIONAL') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - CLI - ADVOCACY');          "";"<td> NAC - CLI - ADVOCACY </td><td>" & "$ " & 'lblNAC - CLI - ADVOCACY') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - CLI - AMAZONIA POSSIV');   "";"<td> NAC - CLI - AMAZONIA POSSIV </td><td>" & "$ " & 'lblNAC - CLI - AMAZONIA POSSIV')&"</td></tr>
<tr>" & If(    IsBlank('lblNAC - CLI - AMAZONIA 4.0');      "";"<td> NAC - CLI - AMAZONIA 4.0 </td><td>" & "$ " & 'lblNAC - CLI - AMAZONIA 4.0') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - OUT - PORTO SUL');          "";"<td> BA - OUT - PORTO SUL </td><td>" & "$ " & 'lblBA - OUT - PORTO SUL') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - DES - LID SEB');            "";"<td> BA - DES - LID SEB </td><td>" & "$ " & 'lblBA - DES - LID SEB') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - DES - REGIONAL');           "";"<td> BA - DES - REGIONAL </td><td>" & "$ " & 'lblBA - DES - REGIONAL') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - DES - MAP');                "";"<td> BA - DES - MAP </td><td>" & "$ " & 'lblBA - DES - MAP') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - DES - MOB');                "";"<td> BA - DES - MOB </td><td>" & "$ " & 'lblBA - DES - MOB') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - EMP - EMPREEND');           "";"<td> BA - EMP - EMPREEND </td><td>" & "$ " & 'lblBA - EMP - EMPREEND') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - EMP - TABOA');              "";"<td> BA - EMP - TABOA </td><td>" & "$ " & 'lblBA - EMP - TABOA') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - EMP - ESCAS');              "";"<td> BA - EMP - ESCAS </td><td>" & "$ " & 'lblBA - EMP - ESCAS') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - CITE - RAPS');             "";"<td> BA - LID - RAPS </td><td>" & "$ " & 'lblBA - LID - RAPS') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - LID - MUOVE');              "";"<td> BA - LID - MUOVE </td><td>" & "$ " & 'lblBA - LID - MUOVE') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - LID - INI');                "";"<td> BA - LID - INI </td><td>" & "$ " & 'lblBA - LID - INI') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - LID - MUOVE LOGIST');       "";"<td> BA - LID - MUOVE LOGIST </td><td>" & "$ " & 'lblBA - LID - MUOVE LOGIST') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - EDU - NOVA ESCO');          "";"<td> BA - EDU - NOVA ESCO </td><td>" & "$ " & 'lblBA - EDU - NOVA ESCO') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - EDU - MUOVE');              "";"<td> BA - EDU - MUOVE </td><td>" & "$ " & 'lblBA - EDU - MUOVE') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - EDU - FORMAÇÃO');           "";"<td> BA - EDU - FORMAÇÃO </td><td>" & "$ " & 'lblBA - EDU - FORMAÇÃO') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - EDU - AVALIAÇÃO');          "";"<td> BA - EDU - AVALIAÇÃO </td><td>" & "$ " & 'lblBA - EDU - AVALIAÇÃO') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - EDU - NOVA ESC INFR');      "";"<td> BA - EDU - NOVA ESC INFR </td><td>" & "$ " & 'lblBA - EDU - NOVA ESC INFR') & "</td></tr>
<tr>" & If(    IsBlank('lblBA - OUT - FUNDO RESERVA');      "";"<td> BA - OUT - FUNDO RESERVA </td><td>" & "$ " & 'lblBA - OUT - FUNDO RESERVA') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - ADV - FUNDO RESERVA');     "";"<td> NAC - ADV - FUNDO RESERVA </td><td>" & "$ " & 'lblNAC - ADV - FUNDO RESERVA') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - ADVOC - CONHEC');          "";"<td> NAC - ADVOC - CONHEC </td><td>" & "$ " & 'lblNAC - ADVOC - CONHEC') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - ADVOC - CLIMA');           "";"<td> NAC - ADVOC - CLIMA </td><td>" & "$ " & 'lblNAC - ADVOC - CLIMA') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - ADVOC - BAHIA');           "";"<td> NAC - ADVOC - BAHIA </td><td>" & "$ " & 'lblNAC - ADVOC - BAHIA') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - CITE - GOVTECH');          "";"<td> NAC - CITE - GOVTECH </td><td>" & "$ " & 'lblNAC - CITE - GOVTECH') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - CITE - EVENTOS');          "";"<td> NAC - CITE - EVENTOS </td><td>" & "$ " & 'lblNAC - CITE - EVENTOS') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - CITE - FUNDO RESERVA');    "";"<td> NAC - CITE - FUNDO RESERVA </td><td>" & "$ " & 'lblNAC - CITE - FUNDO RESERVA') &"</td></tr>
<tr>" & If(    IsBlank('lblNAC - CITE - INSTITUCIONAL');    "";"<td> NAC - CITE - INSTITUCIONAL </td><td>" & "$ " & 'lblNAC - CITE - INSTITUCIONAL') &"</td></tr>
<tr>" & If(    IsBlank ('lblNAC - CLI - COALIZÃO');         "";"<td> NAC - CLI - COALIZÃO </td><td>" & "$ " & 'lblNAC - CLI - COALIZÃO' ) & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - CLI - ICS/CLIM');          "";"<td> NAC - CLI - ICS/CLIM </td><td>" & "$ " & 'lblNAC - CLI - ICS/CLIM') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - CLI - BELIVE');            "";"<td> NAC - CLI - BELIVE </td><td>" & "$ " & 'lblNAC - CLI - BELIVE') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - CLI - MAPB INT');          "";"<td> NAC - CLI - MAPB INT </td><td>" & "$ " & 'lblNAC - CLI - MAPB INT') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - CLI - NOV PROJ');          "";"<td> NAC - CLI - NOV PROJ </td><td>" & "$ " & 'lblNAC - CLI - NOV PROJ') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - CLI - ISA');               "";"<td> NAC - CLI - ISA </td><td>" & "$ " & 'lblNAC - CLI - ISA') & "</td></tr>
<tr>" & If(    IsBlank('lblNAC - CLI - MAPBIOMA');          "";"<td> NAC - CLI - MAPBIOMA </td><td>" & "$ " & 'lblNAC - CLI - MAPBIOMA') & "</td></tr>
</table>
</body>
</html>"

 

And I got this result ON PDF:

 

ONPDFSHOWOTHIS.png

 

And on PowerApps I got this:

 

on powerapps.png

 

Somebody help, please!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Continued Contributor
Continued Contributor

Re: PRINTING HTML NOT WORKING - HELP PLEASE!

@Gorilla_8 Your syntax for if() is incorrect. I have fixed it below, and I have copied the first row three times just to show you how your new table would look like. Try following this approach with your data. 

"<DOCTYPE html>
<html>
<head>
</head>
<body>
<Table>" &
  If(!IsBlank('lblGE - SUP - GPL'), 
  "<tr>
     <td> GE - SUP - GPL </td>
     <td> $ " & 'lblGE - SUP - GPL' & "</td>
   </tr>") &

   If(!IsBlank('lblGE - SUP - GPL'), 
  "<tr>
     <td> GE - SUP - GPL </td>
     <td> $ " & 'lblGE - SUP - GPL' & "</td>
   </tr>") &

   If(!IsBlank('lblGE - SUP - GPL'), 
  "<tr>
     <td> GE - SUP - GPL </td>
     <td> $ " & 'lblGE - SUP - GPL' & "</td>
   </tr>") & 

"</table>
</body>
</html>"

 

I hope this works!

View solution in original post

1 REPLY 1
Highlighted
Continued Contributor
Continued Contributor

Re: PRINTING HTML NOT WORKING - HELP PLEASE!

@Gorilla_8 Your syntax for if() is incorrect. I have fixed it below, and I have copied the first row three times just to show you how your new table would look like. Try following this approach with your data. 

"<DOCTYPE html>
<html>
<head>
</head>
<body>
<Table>" &
  If(!IsBlank('lblGE - SUP - GPL'), 
  "<tr>
     <td> GE - SUP - GPL </td>
     <td> $ " & 'lblGE - SUP - GPL' & "</td>
   </tr>") &

   If(!IsBlank('lblGE - SUP - GPL'), 
  "<tr>
     <td> GE - SUP - GPL </td>
     <td> $ " & 'lblGE - SUP - GPL' & "</td>
   </tr>") &

   If(!IsBlank('lblGE - SUP - GPL'), 
  "<tr>
     <td> GE - SUP - GPL </td>
     <td> $ " & 'lblGE - SUP - GPL' & "</td>
   </tr>") & 

"</table>
</body>
</html>"

 

I hope this works!

View solution in original post

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,409)