Qlik Community

Ask a Question

Qlik NPrinting Discussions

Discussion Board for collaboration on Qlik NPrinting.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor

Exluding an object within an HTML Report

Good Morning,

I've built a HTML report for nprinting and am running into a challenge.  I have an object that from time to time will have no data.  Rather than the object reading "No Data to Display", is there a method I can use to exclude that object from the report if there is no data?

Thanks,

Jamie

PS: I am running nprinting 16.7

2 Replies

Hi James - this is rather HTML question - right?

In NPrinting there is no way we can dynamicly control if the object is inserted into template or not. However since it is HTML you might be able to add script tags nad link them to NPrinting function/variable checking if your chart has data.

like this:

javascript - Show div based on if statement - Stack Overflow

Keep in mind - since you will introduce <script> youw would not be able to use it in HTML embeded email since your email clients will not support it.  For reading HTML reports in browser it will work just fine.

regards

Lech

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.
Employee
Employee

Hi,

I agree with Lech. I would to suggest to try also:

- create a condition that checks if the object has data. If yes you create a report with the object. Then create another condition if the object has no data and in this case send a report without the object

- I usually suggest to create a template of the same type of the final report you want to have. So when you want an HTML report, create an HTML template. But for your specific needs you could also test a PixelPerfect report that can be exported in HTML format. In the template object you can add a formatting rule that made the object visible or not. You don't have a full control of the HTML code generated from a PixelPerfet template like you have with an HTML template.

I did not tested my two suggestions but I think they should work.

Best Regards,

Ruggero

---------------------------------------------

When applicable please mark the appropriate replies as CORRECT https://community.qlik.com/docs/DOC-14806. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.



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.