Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
JeromeS
Partner - Contributor III
Partner - Contributor III

Nprinting HTML/CSS report generated based on Qlik Variable

Hello,

I would like to be able to create a full HTML/CSS report based on a Qlik Variable

The Qlik Variable thus contains the whole HTML/CSS Code

I tried to use a Nprinting Variable Object but the preview of the report in the designer only display the code, not the result of the code (which sounds logical)

If it is not a possibility, is it possible to modify the content of a Nprinting Report from outside the Nprinting Designer (with a Post Request for example) ?

please find below the actual code, if it is of any help

Kind regards,

Jérôme

 

<html>
    <body>
	<style type="text/css">   
       		a:link {
              		color: white;
              		background-color: transparent;
              		text-decoration: underline;
              		}
       		table.MyTable {
              		font-family: Helvetica Neue,Helvetica,Arial,sans-serif;
              		border: 4px solid #3F3F3F;
              		background-color: #595959;
              		width: 100%;
              		height: 100px;
              		text-align: left;
              		}
       		table.MyTable td, table.SalesBudgetTable th {
              		border: 1px solid #FFFFFF;
              		padding: 4px 4px;
              		}
       		table.MyTable tbody td {
              		font-size: 12px;
              		color: #FFFFFF;
              		}
       		table.MyTable thead {
              		background: #3F3F3F;
              		}
       		table.MyTable thead th {
              		font-size: 14px;
              		font-weight: bold;
              		color: #FFFFFF;
              		text-align: left;
              		}
	</style>
        	<table class="MyTable">
               <thead>
                      <tr>
                          <th>Business Unit</th>
                          <th>Entity</th>
                          <th>Access Link</th>
                      </tr>
               </thead>
               <tbody>
                      <tr>
                          <td>The Nederlands</td>
                          <td>Bryan LDC</td>
                          <td><a href="https://community.qlik.com/">Go to Qlik APP</a></td>
                      </tr>
                      <tr>
                          <td>The Nederlands</td>
                          <td>Bryan LDC</td>
                          <td><a href="https://community.qlik.com/">Go to Qlik APP</a></td>
                      </tr>
               </tbody>
        </tr>
        </table>
    </body>
</html>

 

Labels (2)
1 Solution

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

using just variable will not work as the characters in variable such as "<" ">"will get html encoded when report is generated. 

Workaround would be to put your variable in a table and disable html encode on table properties in nprinting template. 

Similar approach i described here  https://nprintingadventures.com/2020/04/24/how-to-build-html-pivot-table-in-nprinting/

 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.

View solution in original post

2 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

using just variable will not work as the characters in variable such as "<" ">"will get html encoded when report is generated. 

Workaround would be to put your variable in a table and disable html encode on table properties in nprinting template. 

Similar approach i described here  https://nprintingadventures.com/2020/04/24/how-to-build-html-pivot-table-in-nprinting/

 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
JeromeS
Partner - Contributor III
Partner - Contributor III
Author

Hi Lech,

 

Thanks for your answer. I will try that

 

Big Fan of your blog :=)

 

Jérôme