18 Replies Latest reply: May 31, 2017 3:41 AM by Kevin Chevrier RSS

    Hide Header when no data to Display

    Kevin Chevrier

      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

        • Re: Hide Header when no data to Display
          Prashant Sangle

          try

          conditional option in expression tab.

           

          Regards,

          • Re: Hide Header when no data to Display
            Tamil Nagaraj

            Hi Kevin,

             

            You can use conditional enable option for your expressions like below.

            Capture.PNG

            You can also conditionally show any dimensions like below.

            Capture.PNG

            • Re: Hide Header when no data to Display
              Vineeth Pujari

              Hide the entire table if there is no data to display

               

              in the layout table Check conditional Visibility >>  add a condition for the chart to be visible

                • Re: Hide Header when no data to Display
                  Kevin Chevrier

                  Hi,

                   

                  I've tried this solution but it doens't work.

                   

                  I have an error message when I Previous my report on NPrinting :

                  Erreur message erreur personnalisé.PNG

                  Kevin

                  • Re: Hide Header when no data to Display
                    Lech Miszkiewicz

                    you cannot do this on Qlik side - as NPrinting will throw an error similar to the one from screenshot above.

                     

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

                    Is it straight or pivot table?

                     

                    What is you template like? does it have Page? or Level entity used?

                    Depending on all above information we may/may not be able to find a solution to your requirement.

                     

                    regards

                    Lech

                      • Re: Hide Header when no data to Display
                        Kevin Chevrier

                        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

                          • Re: Hide Header when no data to Display
                            Lech Miszkiewicz

                            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. 

                            • Re: Hide Header when no data to Display
                              Lech Miszkiewicz

                              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

                                • Re: Hide Header when no data to Display
                                  Kevin Chevrier

                                  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

                                    • Re: Hide Header when no data to Display
                                      Lech Miszkiewicz

                                      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.