4 Replies Latest reply: May 15, 2014 9:56 AM by RalphB _ RSS

    Runtime Parameters

    RalphB _

      I have a vb script set up to access 2 different spreadsheets with 2 different models one at a time each with a runtime parameter.  The runtime parameter works for the first spreadsheet and model but I have to manually input the runtime parameter into the second model.


      Here are the runtime parameters I have set up:

      rtDate = MonarchObj.setruntimeparameter("Expdate", rdate) for the first model and


      rtDate1 = MonarchObj.setruntimeparameter("DateCld", Rdate2) for the second.


      The rdate and Rdate2 are both Dimmed as strings and the boolean flags return "True" for each.


      Any suggestions??  :confused: 



        • Runtime Parameters
          Data Kruncher

          Hi Ralph,


          Coincidentally, I've been working with programming runtime parameters recently, but only with one report and one model. Let's see how much trouble a little experience can get me into today.       


          Are you setting the runtime parameters before or after you open the model(s)?



          • Runtime Parameters
            RalphB _

            Hi Sandy,


            Before I even open the spreadsheets.  I the first parameter is set fine, it is just when I try to set a second one in a second model.


            I have successfully set 2 parameters but that was just within 1 model.  :confused:

            • Runtime Parameters
              Nick Osdale-Popa

              To clarify, you are running two different reports with two different "parametized" models, yes?


              My only suggestion is to run a .CloseAllDocuments() before running your second report/model.


              I have one routine that loads 3 reports with 3 different models each with a parameter and have no problems whatsoever.

              • Runtime Parameters
                RalphB _

                Thanks Nick,


                That's exactly what I needed and kept overlooking.    redface.gif[/img] 


                Most of my other scripts I run the .CloseAllDocuments() but for some reason, I didn't do that in this one.  I guess I thought since I was working with databases I didn't need to.


                Thanks again for your help.