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: 
charan_j
Contributor II
Contributor II

Conditionally Hide/Show objects in Nprinting HTML reports from Qlik Sense

I am creating an HTML report embed in Gmail where I need to conditionally hide and show the table object.

The specific table should be visible only when there are no filters applied to a particular field. (eg. Country)

If any values filtered in the Country field (eg. USA), the table should be disappeared from the report.

Is this something achievable without javascript where the Gmail body supports only inline CSS?

Labels (2)
1 Reply
Ruggero_Piccoli
Support
Support

Hi,

HTML templates have not a feature to conditionally hide/unhide parts of them. 

You can:

  1. create a straight table in the source app that has rows of data only when you want to show the table in the HTML report
  2. refresh the connection cache
  3. create the HTML report
  4. open the HTML template in Qlik NPrinting Designer 
  5. add the straight table as a level. The level will be expanded with a row for each value in the straight table. No rows in the straight table will produce nothing in the generated HTML report
  6. insert the level in the template and the content you want between the opening and closing tags
  7. run a preview
  8. add the filter to the report in case you need
  9. create a task, add the HTML report and embed it into the email body. You can embed how many HTML reports you want in a single body

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.