5 Replies Latest reply: Nov 20, 2012 8:32 AM by a.solbrekke RSS

    Object missing in pdf report



      I am creating a pdf report in QlikView for distribution. When a table is empty, i.e there is no entries this period, the object disappears and no error message (i.e Calculation condition unfulfilled) is shown. Any ideas to solve this? I want to display a message if the chart is empty. //Arnstein

        • Re: Object missing in pdf report




          You could add a text object with the text 'There's No Data To Display Analysis' and add something like the following expression in the object Properties--Layout-Conditional show section :






          count(ID_Key)<0 where ID_Key is a field in your table data that's also present in the chart.


          Place this text object on a test sheet and add it to your report that you'd later print as PDF.


          This way, if there is no data in the table, you would already have a text object with the message 'There's No Data To Display Analysis'  available in your report for printing.


          If your report has data, the object will be automatically (read:conditionally) hidden so that your table/chart is printed in the PDF.



          If you are just trying to change the Error Message to something other than 'Calculation condition unfulfilled', you can do so like this.


          1. Go to Chart Properties--General Tab--and click the Error Messages button.Now select 'Calculation Condition unfulfilled' under Standard Messages. Now, type a message like 'There's no data available' under Custom Message text area.


          Hope that helps.





            • Re: Object missing in pdf report

              Thanks for your response, Khaled.


              Your solution with adding a textobject works fine, but here's a few considerations:


              • If you are using "single page" in the report, you can conditionally hide/show a text object if a table is emty, and replace the empty table with a error msg.
              • If you are using " multi page", you need to place the text object in the header section of the page. You cannot place it in the main section, because only one object can be placed there.
              • In case of many different tables, with different conditions in a report, you need to create one error msg per table. In this case, (and in my case) it will be many objects in the report, which will lead to some maintanance issues...


              I am not very satisfied with this solution, it should be possible to see the error message in the reports as it is displayed in the dashboard objects. But unfortunately, it seem to be the only way to do this.




                • Re: Object missing in pdf report



                  You are right indeed about single/multi-page reports but there's no direct way of doing this in my know yet.


                  Perhaps, if you want at least the table structure to be displayed in the report even when the report has no data, you can try this:


                  1. Add an expression into the chart that conditionally shows text. It could be something like this:


                  =if(count(ID)<=0,'No Data','Showing Data')


                  2. Set this expression to enable conditionally. You can use something like:




                  3.Promote this to be the first column in your table.


                  This way, when there is no data, Step 2 will enable the expression text and Step 1 will display 'No Data' in one of the cells. This would certainly display the table in the report (in not the most pleasing way, of course) . This method would solve two things:


                  1. For multiple reports, you won't need to use multiple text objects. Just a similar dynamic column with conditional show will do.


                  2. You won't have to worry about single/multi-page report since you will no longer be using that text object for the message.


                  On a side note, you can invert colors to highlight the text message in your hidden column.


                  It would be nice to set the font size of this text to something bigger than the usual which would enable the 'No Data' text to be seen easily when the report is printed, but I am not aware of setting the font-sizes using expressions, if it's possible in first place.


                  Hope that helps.





              • Re: Object missing in pdf report

                You can show the custom error messages


                1. go to chart properties

                2. Under General tab "Error Messages" button is there

                so here you can set the custom message.