3 Replies Latest reply on Jan 25, 2011 3:42 PM by TonyScalese

    Executing Report from Event Script

    828743
      Hi all,

      I try to execute a customized report from an FDM EventScript and it doesn't work as expected.
      When the script is executed I get a new window with "Error: Invalid Report ID: 0".
      I already tried to somehow set the report ID but I cannot get this to work.

      The script looks as follows:

      Sub AftValidate(strLoc, strCat, strPer, lngProcState)
      'RES.PstrActionValue = API.DataWindow.Connection.PstrDirReport & "\DeltaDifferences5002.rpx"
      RES.PstrActionValue = 5002
      RES.PlngActionType = 3
      End Sub

      What am I missing here? How can i pass parameters to the report?
      Any help is appreciated!

      Best regards,
      Markus
        • 1. Re: Executing Report from Event Script
          TonyScalese
          Look at the accelerators.
          1 person found this helpful
          • 2. Re: Executing Report from Event Script
            828743
            Hi TonyScalese,

            thanks for your answer, but I'm not really able to find an accelerator with RES.PlngActionType = 3 (dwShowReport)
            What I can find is one wiich publishes a file e.g. as an PDF to the filesystem, which I can send back to the client using RES.PlngActionType = 4 (dwShowXmlFile) and RES.PStrActionValue = strFullFilePath.
            This does work of course, but I'm trying to achieve the result with RES.PlngActionType = 3 (dwShowReport), which expects per documentation some settings in RES.PcolActionValues.
            So what I'm looking for is basically how to set RES.PcolActionValues correctly to make this work. I get an "Error: Invalid Report ID: 0" at the moment.

            Best regards,
            Markus
            • 3. Re: Executing Report from Event Script
              TonyScalese
              You need to publish the report (to PDF, XLS, etc) before you can show it. Look at the accelerators for how to publish.

              If this is helpful or correct, please take the time to flag it as such. Thanks.
              1 person found this helpful