5 Replies Latest reply on May 30, 2013 3:45 PM by user8755188

    Error trying to display a report file in FDM event script

    user8755188
      Hi
      I am trying to display a file (report) during an event script and receive an error "Object reference not set to an instance of an object" . The process works in version 9.3 but is generating this error during our upgrade testing on 11.1.2.2 (different hardware)

      The file (check report) is getting written correctly the \OutBox\Log directory. The file contains a standard Check Report with a file extension .pdf ( lngFileType = 31)
      We have no issues creating the file

      We try to display the file on the screen for the user using the following code which fails with the "Object reference not set to an instance of an object" error and also a message "Could not load XML file:" with the file name and path

      'Open report file in web client
      RES.PlngActionType = 4
      RES.PstrActionValue = strFileName

      Symptoms:
      We can open the same file as text with RES.PlngActionType = 1
      Everyone has rights to open/read a file in the directory
      File can be opened manually and appears correct

      Any help would be appreciated. I have not found similar issues on the forum. Support has offered no suggestions to date
        • 1. Re: Error trying to display a report file in FDM event script
          LarryR
          Did you change the Integration Setting, "FDM Web Server Name", to indicate the correct server (this should be changed from the default, "localhost")?

          Also, your code may need some tweaking when upgrading from prior versions. Here is the code that I currently use to open the Check Report:
          ' Publish the Check Report in PDF format
          If Not Trim(strValGroup)="" Then
               lngReportID = 87' Default Check Report
               strBaseName = strLoc& "_" &strCat& "_20" &Right(Trim(RES.PstrPer),2)& "_" &Trim(Left(RES.PstrPer,3))
               strPublishPath = API.DataWindow.Connection.PstrDirOutbox& "\Logs\" &LCase(strBaseName)&".pdf"
               Set objReport = CreateObject("upsWReportingDM.clsReportPublisher")
               objReport.mInitialize API
               objReport.mReportPublishToFile CLng(lngReportID), CStr(strPublishPath), CLng(31)' 31 = PDF
               Set objReport = Nothing
          End If
          • 2. Re: Error trying to display a report file in FDM event script
            user8755188
            Thank you for your response

            Yes, we are using a DNS name and the file we are trying to open includes this DNS path and file name
            • 3. Re: Error trying to display a report file in FDM event script
              LarryR
              Have you tried RES.PlngActionType = 3? If that doesn't work, this may be a client-side issue.

              If you Enable Validation Report in the Integration Settings, does the Check Report display the PDF during the normal Check phase? If not, make sure that the client machine's settings are configured to always open .XML files with Internet Explorer.
              • 4. Re: Error trying to display a report file in FDM event script
                user8755188
                Hi again,
                We are not having an issue generating the file, we are having an issue opening the file. Contents of the file we create are correct. File is in an accessable directory.

                Have you ever tried to open the the file you created? in version 11? We can open the file with ActionType = 1 (ScriptActionTypes - File), but not with type = 4.

                code :
                     RES.PlngActionType = 4                    '(See Enumeration: ScriptActionTypes - XML File)

                     RES.PstrActionValue = strFileName
                • 5. Re: Error trying to display a report file in FDM event script
                  user8755188
                  Hi and thanks for your response.

                  Yes, we have tried all the various type of files ( ScriptActionTypes). The Type = 1 will open the file, but as a text stream without formatting, etc. If we try type = 3 we receive a different error message:

                  Error: Invalid Report ID: 0
                  Detail: Stacktrace:
                  upsAppServerDM._clsAppServerDM.fPublishReport(lngReportID[Int32], lngPubFileType[Int32], strReportSQL[String], strSubReportSQL[String])
                  Hyperion.FDM.Pages.ViewReportActionEvent.ExecuteReport(reportID[Int32], sqlStatement[String])
                  Hyperion.FDM.Pages.ViewReportActionEvent.PreviewReport()

                  Also, the Validation Report is enabled (we are using check with warnings - ID133), I have tried changing the default Web Settings from .PDF to .html and back again and tried the various other default options available under Web Settings.

                  If we create a simple test text file, we can open the file as text (Type = 1)

                  Here is the complete error message employing Type = 4 (XML)

                  Error: Object reference not set to an instance of an object.
                  Detail: Stacktrace:
                  Hyperion.FDM.Pages.IntersectionSummaryCheck.FillTitleRow()
                  Hyperion.FDM.Pages.IntersectionSummaryCheck.Page_Load(sender[Object], e[EventArgs])
                  System.Web.UI.Control.OnLoad(e[EventArgs])
                  Hyperion.FDM.Pages.BasePage.OnLoad(e[EventArgs])