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

Hide Header when no data to Display

Hi,

Is there a way to hide header in a table when there is no Data to display inside ?

For one table I have just the header and that's not beautiful...

Kevin

22 Replies
kevinchevrier
Partner - Creator III
Partner - Creator III
Author

Thank you for your answer.

Here is my answer :

What template are you using in NPrinting? XLS, Word, PixelPerfect? HTML? ==> Word

Is it straight or pivot table? ==> Both, there are average 10 tables like that

What is you template like? does it have Page? or Level entity used? It has got Levels

Kevin

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi. I guess with word document template we will not be able to do anything. Pixel perfect template would give you little bit more co trol over this or in Excel uou could use macros as other guys suggested. With MsWord-i think we cannot do anything. 

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

Hi,

In Your excel template

on open event apply macro for hide to column.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

yeah, excel would be doable -but he needs word template...

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

Hi Kevin

I thought about your issue - and i came up with workaround-i hope....

Would you be able to snapshot as detailed as possible how your NPrintng template is build for this word document?

What i am thinking of is: how to apply filter on combinations of records which NPrinting goes through when creating your report so it does not produce empty chart at all.

This would mean for example, that instead of going in the loop through all values in some field we would filter dataset to only show and loop through thoses values which are returning you some numbers in your tables.

SO my idea is:

  • DO NOT hide charts which do not have values,

but instead

  • SHOW ONLY CHARTS which do have values

To see whether this would be possible we would have to look at your application, see if we would be able to prepare all flags on script side for such filtering?

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

Hi Lech,

Well, I also think about this idea :

  • SHOW ONLY CHARTS which do have values

But I don't really understand how I can do that. In addition, it seems that's already working for some charts. Indeed, in another report, when there are no data in 2015, it don't appears. Even if, I still have level on the last 3 years.

The only difference between the two reports is : the first has got level on company, the second (where some charts works) has got level on collective agreement.


That's weird and I don't understand why the behaviour is different between these reports. What about the flag you are talking about ? I never do anything like that for level on collective agreement.


Kevin

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

In short:

On script side i would create a composite key, build of component you are looping your report through (in NPrinting Levels or Pages), then on script i would calculate aggregates for each key (agrregate would be a measure you have in your charts in NPrinitng.

Then - also in script i would calculate flag for each of these keys;

like:

If(aggregate > 0 ,1,0) as myFlag

then in NPrinting i would use myFlag = 1 as a filer on report! Then all combinations with no measure (empty charts) will not be created at all!

The problem is - that it may require a significant change on your datamodel, especialy if your measures components are coming from many tables. That is why without seeing your app it is imposible to tell you exactly how the solution has to look like.

cheers

Lech

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

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

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 to add to above.

refering to your example - my flag would have value "0" for 2015 and 1 for other years for certain companys ...

does it make sense?

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

Hi Lech,

It seems to be a good idea. I'll try it and keep you in touch.

Thank for help

Kevin

LDenivelle
Contributor II
Contributor II

Hi !

 

I have the same issue.

So,  any solution ? 🙂

 

Regards

Laure