2 Replies Latest reply: Mar 5, 2013 3:08 PM by James Johnston RSS

    Setting up loops in automated report

    James Johnston

      Hello QVCommunity,

       

      I just had 2 quick question regarding LOOPING in an automated PDF report I have running.  This is not another post with PDF set up questions...i know there are 10000 posts about that already

       

       

      1.  When setting up a particular page in an automated report to loop on a specific field, is it possible to specify it only to loop on certain selections?  I currently use the default which loops through every option of SCHOOL.  But what if I only wanted to select 2 specific schools and not all of them?  pic below...the 2nd page currently loops through all 3 SCHOOL options, creating 3 additional pages total... but if i only want to specify 2 SCHOOLS to loop (thus creating 2 pages intead of 3) is this an easy fix?  Or does it require a lot of back-end code and development?  I am looking for a quick fix, if any exists...

       

      pic 1.png

       

      2.  Is it at all possible to get an automated report to loop throughout a specific field that happens to set up to "Always one selected value" (Screenshot of field SCHOOL attached).  The same QV app referenced above requires this SCHOOL field to be set up as "Always one selected value" and unfortunately it prevents my automated PDF report from looping through the "non-default-selected" SCHOOLS.  I have to manually TURN OFF the "always one selected value" and completely clear out the SCHOOL filter before running it or else it doesnt work....  Anyone know of a way around this?

       

      pic 2.png

       

      Thanks for any help or suggested tips...

       

      James

        • Re: Setting up loops in automated report
          Gysbert Wassenaar

          1. You could try creating several reports and use bookmarks for the Initial Selections (see below).

          2. In the report you can choose Clear All or specify a bookmark to be used. You can create a bookmark containing your selections and have the report use that bookmark:

           

          comm74169_2.png

            • Re: Setting up loops in automated report
              James Johnston

              Thanks for quick reply Gysbert.  A few updates...

               

              I was able to create a bookmark that unchecks the "Always 1 selected" and basically selects all 3 options... and this was used as the Initial Selection like in your photo above.  So that solved the issue with the report only showing 1 SCHOOL.  This alone will make the current manual procedure i do more convenient for sure; however, the only issue I foresee is that it does not revert the qvw back to its original "Always 1 Selected" state for that field. 

               

              To give you background, when this report is fully automated, it will be triggered to create a new PDF every single time the app itself reloads (once an hour), and thus... i cant risk it reloading the 1st time and then saving back to the production folder with the "Always 1 Selected" turned off.  Does this make sense?  Any suggestions on a way to have the report turn this "Always 1 Selected" back on each time after it has successfully stored the PDF file in its folder?

               

               

               

              And as for the "Clear All".. unfortunately that does not work with "Always 1 Selected".  I tried that first just incase, but the reports function just like the dashboard does in general, where clear does not have any effect on a field that is "Always 1 selected".

               

              Thanks though for quick responses!!

               

              -James