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: 
Nanou
Contributor
Contributor

Hide parts of a html report

Helloooo,

I'm very new to qliksense and nprinting; so i apologise if my question is too obvious or anything.

 

I've been trying to do an html report just to get a simple table in the mail body. Whenever the table is empty I want it to show a little message instead.

So in the style part i added this :


%%vMessagetoHide%% {
display:none ;
}

It should either hide "p1" the message or "table" the table. It works well in the preview but it seems the "display:none" (or visibility:hidden) command doesn't work while in the task.

Is the only way to create two tasks with a condition or can I make it work using the html?

 

Thank you very much

Labels (1)
1 Solution

Accepted Solutions
Ruggero_Piccoli
Support
Support

Hi,

You could try to:

  1. create 2 HTML report: one with the table and one with the error message
  2. create a condition https://help.qlik.com/en-US/nprinting/May2022/Content/NPrinting/ReportsDevelopment/Conditions.htm 
  3. create a publish task
  4. add the HTML report with the table and the associated condition set at True
  5. add the HTML report with the error message and set the condition to false
  6. embed the two reports in the publish task email body. When the condition is true the report with the table will be produced. When it is false the one with the error.

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.

View solution in original post

3 Replies
Ruggero_Piccoli
Support
Support

Hi,

You could try to:

  1. create 2 HTML report: one with the table and one with the error message
  2. create a condition https://help.qlik.com/en-US/nprinting/May2022/Content/NPrinting/ReportsDevelopment/Conditions.htm 
  3. create a publish task
  4. add the HTML report with the table and the associated condition set at True
  5. add the HTML report with the error message and set the condition to false
  6. embed the two reports in the publish task email body. When the condition is true the report with the table will be produced. When it is false the one with the error.

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.
Nanou
Contributor
Contributor
Author

Hello !

I had not realised you could put conditions to reports as well, I guess I will go with this option then, though i was trying to avoid "duplicating" reports.

 

Thank you very much 😀

Ruggero_Piccoli
Support
Support

Hi,

You can insert conditions in Tasks or Reports in Tasks. In your case you have to add the condition to reports added to the task. 

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.