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: 
Danijel
Partner - Creator III
Partner - Creator III

If Table empty - HTML Report

Hello everybody,

I send a monthly report by mail based on an embedded HTML report.

Now it is possible that in one month there are no values in the table, the mail should be sent anyway.

Is it possible to display a text instead of the table if the table is empty (check e.g. by a variable)?

I could imagine it like this: If values exist, show table, if no values exist, show text "no values".

Does anyone have an idea?

Thanks in advance.

Labels (2)
1 Solution

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

This is not NPrinitng question really, right?

It is down to HTML and how different email clients will deal with it.

Below you can see example of what i have tested...It worked on web clients, iphone mail and partially worked on Outlook 2016 client.  (Outlook 2016-I was able to hide/show <table> tag, but <p1> hide/show did not work.. I am testing now if  using other tags would work like h1 etc...

But the idea behind is more less like on the picture attached:

Capture.PNG

 

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

7 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

This is not NPrinitng question really, right?

It is down to HTML and how different email clients will deal with it.

Below you can see example of what i have tested...It worked on web clients, iphone mail and partially worked on Outlook 2016 client.  (Outlook 2016-I was able to hide/show <table> tag, but <p1> hide/show did not work.. I am testing now if  using other tags would work like h1 etc...

But the idea behind is more less like on the picture attached:

Capture.PNG

 

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.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Just wanted to confirm that that usual <h1> tag worked when used with style display: none;

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.
Danijel
Partner - Creator III
Partner - Creator III
Author

Hi @Lech_Miszkiewicz 

Yeah, you're right, it's actually an html question.

Thanks for your test and your hints, I will test that.

sique132
Contributor III
Contributor III

Hi @Lech_Miszkiewicz , thanks for this as it is working for me using the h1 but any suggestions on how to maintain formatting in the embed?

sique132_0-1645625114248.png

sique132_1-1645625906846.png

 

 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @sique132 

not sure what you mean. If you mean how to style html then i suggest you study the basics in help document here:

https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/HTMLReports/HTML-formatting.htm

If you have more requirements you may search community for topics similar to those below:

https://community.qlik.com/t5/Qlik-NPrinting-Discussions/HTML-table-styling-does-not-work-with-with-...

cheers

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.
sique132
Contributor III
Contributor III

No, i have the styling but it's not coming though in the embedded email, just in the attachment. The screenshots I included show the attachment vs the email.

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi, so you have to study what kind of styling is the mail client accepting - this is not a question of nprinting but rather CSS compatibility and support in web browsers and email clients. You can use websites like this one: https://www.campaignmonitor.com/css/ to check what is supported and what isn't (just like example on below picture)

Lech_Miszkiewicz_0-1645738397795.png

cheers

 

 

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.