"Runtime Error 5: Invalid procedure call or argument" when generating a report
Entry Type: Informational
Product: FRx
Application: FRx Desktop
Version Reported: All
Subject:
The error "Runtime Error 5: Invalid procedure call or argument" occurs when generating a report.
Possible Resolutions:
FRx for Sage MAS 90 ERP, Sage MAS 200 ERP, Sage MAS 500 ERP, and Sage PFW ERP:
- A column header spans multiple columns, and either the beginning column or the ending column in the header range is set to NP, or XO and the values are zero for that column, or the column header spreads backwards (for example D to C). To resolve this issue,
-
- Open the column layout.
- Select the header above the column in question, and verify the range.
- There is an invalid amount and date format in the Company Information window. To resolve this issue, change the amount and date format information to a valid country code.
- The report date of the catalog is incorrect. To resolve this issue, perform the following:
-
- Open the column layout, and verify the fiscal year and period code.
- Verify the period that the report is generated for is valid. For example, the report date in the catalog is set to period 1, which is January 31, 2003. The column layout is referencing base 1 for the fiscal year.
- If the accounting system 2002 does not exist, FRx is being asked to generate a report for a year that does not exist and that causes the error.
- If a reporting tree is used, make sure the periods and years are set up for each company.
- Correct the short-date style format in the Regional Settings Properties window.
-
- Click the Start button, point to Control Panel, and click Regional Settings.
- Click the Date tab.
- Verify the format m/d/yyyy is selected for the short-date style.
- Click OK or Apply to save the change.
- Create a new catalog using the same building blocks.
-
- On the File menu, point to New, and click Catalog.
- Enter a new name and description.
- Select the same row, column, and tree as the previous catalog, and then click Save.
FRx for Sage MAS 500 and Sage PFW:
FRx allows only one record for each fiscal year. Verify that there are not multiple records for the same year, for example, 2001 and 2001A. To correct, modify the General Ledger to one record per year
For more information see How to restructure the fiscal calendar.
FRx for Sage MAS 90 and Sage MAS 200:
-
Expand General Ledger and Setup; double-click Fiscal Year Maintenance.
-
Confirm that there are prior and future fiscal years set up and that the fiscal years are in sequence.
-
Have all users exit FRx.
-
Open Windows Explorer, locate the ..\SysData\ directory and delete any files that have an extension of .g32. For more information, see How to delete and rebuild the FRx index files.
FRx for Sage PFW:
- Fiscal Year End Date for each period defined in Sage PFW is inconsistent:
Change the fiscal year end date for each period so that they are the same. - There is an invalid date in the NLPDATES (Period Dates) file in Sage PFW:
Determine the record containing an invalid date and correct it. - Verify that there are no overlapping period dates or fiscal years in General Ledger. Make sure the period dates are set up consistently without skipping dates or years.
- Delete the ..\Platinum\<Company_Key>\xxNLX*.* (where xx = module code) files.
- The NLPDATES files are damaged. To resolve this issue, recover the file. For more information, see How to recover data files in Sage PFW 5.01 or greater. If the error persists, copy the NLPDATES file from the ..\Platinum\Data\ directory to the ..\Platinum\<Company_Key>\ directory, and recreate the period dates.