2 Replies Latest reply: Oct 10, 2014 6:02 AM by James Peel RSS

    CalendarGen function failing when reloading document in QMC



      I have created a new calendar document using the CalendarGen function included in the framework, which works perfectly when reloading from the document itself. However I have placed the document into the reload schedule in our management console and it always fails when it gets to the point where it calls the function.


      The log doesn't really give any information to why it has failed, and just says:


      CALL CalendarGen('date', 'Calendar, '4', '01/09/2006', '31/08/2012')

      Error: Script line error:

      General Script Error


      Does any one have an idea why this would be happening, or how to get any more details about the error?



        • Re: CalendarGen function failing when reloading document in QMC
          Magnus Berg

          Hi James, my guess is that the framework does not initiate correct when running from the Publisher. Check the security settings so that service account (running QlikView Distribution Service) have full access to the QDF folders. You can also try adding the CalendarGen include file right after 1.Init.qvs, as a work around,


          Hope this helps

          Best regards


            • Re: CalendarGen function failing when reloading document in QMC

              I've just checked the account that the service runs as and it definitely has access to the folders.


              My load script include files currently look like this:


              IF '$(vG.BasePath)'= '' then

                let vL.y = ;

                for vL.x =1 to 10-1

                SET vL.y$(vL.x)='..\';

                LET vL.Path='$(vL.y$(vL.x))'&'$(vL.Path_tmp)';

                LET vL.Path_tmp='$(vL.Path)';


                exit for when not '$(vG.BasePath)'= ''


                SET vL.Path = ;

                SET vL.Path_tmp = ;






              Is this what you meant? I've also tried replacing the CalendarGen include with the LoadAll include and it is still failing.


              I've got a fair few other documents that have the framework loaded in, for getting variables from the variable editor etc, that work with the but this is the only one that is making an explicit function call. Is it possible to put the code in the file into my document to see if I can narrow down the issue?


              EDIT: I've just placed the code for the CalendarGen sub into my document with the framework initialisation script, and now the document fails in a different location. It appears to get all the way through the code and fail when attempting to store the calendar into a QVD



              EDIT 2: I've tried putting the script for this calendar generation in with an existing document and reloading that through the scheduler. That reloaded successfully and stored the QVD with no issues. So it appears to be when it is in this document that it fails