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: 
Not applicable

does nprinting support id or class in html format report?

Hi,

I tried to add id or class in the html elements in the html report, then applied the style (as css) in the style but it doesn't work. Does nprinting only support to add those style in the html element individually? not able to group it by id or class in header or css stylesheet?

1 Solution

Accepted Solutions
Daniel_Jenkins
Specialist III
Specialist III

Hi Ming,

You can use the <style> tag in the header section of the document to create CSS rules that you can then apply. You will need to uncheck the Keep Source Formats table property.

In the template:

Output:

HTH - Daniel.

View solution in original post

6 Replies
Anonymous
Not applicable
Author

Hi, Ming,

I think it works.

Just test a simple .html report:

html as below:

<html>

<head>

<style>

h2.first {text-align:center}

</style>

</head>

<body>

<h2 class="first">Part 1 </h2>

<h2 class="second">Part 2 </h2>

</body>

</html>

And just open the html report in browser, it works. Or maybe I wrongly understand your requirement?

Zhihong

Daniel_Jenkins
Specialist III
Specialist III

Hi Ming,

You can use the <style> tag in the header section of the document to create CSS rules that you can then apply. You will need to uncheck the Keep Source Formats table property.

In the template:

Output:

HTH - Daniel.

Not applicable
Author

thanks so much for all your help!

martin_escobar
Contributor II
Contributor II

Hello Daniel,

This works ok if you open the html in a browser but there is a downside: I you intend to attach the HTML to the body of an email, you have to apply inline css styling in order to work (internal css don't work at least for me).  

Best Regards.

 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

I agree with Martin, however it is not NPrinting related issue, but rather mail client problem

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.
Ruggero_Piccoli
Support
Support

Hi @martin_escobar ,

I agree with @Lech_Miszkiewicz ; different email clients render the same email body in different ways. There are third party only tools to test the HTML email bodies and display the results on different cliente. I found those services useful to solve customer formatting issues in the past.

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.