Dict_UpdateReportsDictionary()

Examples


The Dict_UpdateReportsDictionary() function updates a reports dictionary to work with the new version of your application. This function attempts to preserve the modifications made to the reports in the reports dictionary. The update is performed in two parts. The first part updates resources in the reports dictionary. The second part updates reports to make them compatible with database changes in the application.

Syntax

Dict_UpdateReportsDictionary(main_product_dictionary, previous_application_dictionary, new_application_dictionary, reports_dictionary, exception_script, progress_script, from_version, to_version, input_file, output_file)

Parameters

main_product_dictionary – A string containing the complete path, in generic format, to the main product dictionary. If the reports dictionary being updated isn’t part of a product that integrates with a main product like Microsoft Dynamics GP, set this parameter to the empty string (""). If the reports dictionary being updated is part of a product that integrates with Microsoft Dynamics GP, set this parameter to the path to the Dynamics.dic dictionary.

previous_application_dictionary – A string containing the complete path, in generic format, to the previous version of the application dictionary. If you don’t want to perform the first part of the report update process, specify the empty string ("") for this parameter.

new_application_dictionary – A string containing the complete path, in generic format, to the new version of the application dictionary.

reports_dictionary – A string containing the complete path, in generic format, to the reports dictionary being updated.

exception_script – A form-level procedure that is called when exceptions are encountered during the update process.

progress_script – A form-level procedure that is called to indicate the progress of the update process.

from_version – A string specifying the product version to update from. This value is used to indicate which sections of the input file will be used when performing the second part of the report update. If you want the second part of the report update process to simply perform a “cleanup” operation, specify the empty string ("") for this parameter.

to_version – A string specifying the product version to update to. This value is used to indicate which sections of the input file will be used when performing the second part of the report update. If you want the second part of the report update process to simply perform a “cleanup” operation, specify the empty string ("") for this parameter.

input_file – A string specifying the complete path, in generic format, to the input file containing information for the second part of the report update. If you want the second part of the report update process to simply perform a “cleanup” operation, specify the empty string ("") for this parameter.

output_file – A string specifying the complete path, in generic format, to a text file that will contain a log of all the changes applied to the reports dictionary.

Return value

An integer corresponding to one of the following constants:

[spacer]

Constant

Description

STATUS_SUCCESS

No error occurred.

STATUS_PRIMARY_DICT_MISSING

Unable to open main product dictionary.

STATUS_OLD_PROD_DICT_MISSING

Unable to open previous application dictionary.

STATUS_NEW_PROD_DICT_MISSING

Unable to open new application dictionary.

STATUS_REPORT_DICT_MISSING

Unable to open reports dictionary.

STATUS_ERROR_OPENING_LOG

Unable to open the log file.

STATUS_ERROR_OPENING_INPUT

Unable to open the input file.

STATUS_INPUT_FILE_ERROR

An error exists in the input file contents.

STATUS_VERSION_INCOMPATIBLE

The reports dictionary is not compatible with the previous application dictionary.

STATUS_ERROR

An unknown error occurred.


Comments

The first part of the the updating operation performed by this function is also performed automatically during the unchunking process. If the first part of the report update (updating resources in the reports dictionary) was performed as part of unchunking, we recommend that you use the Dict_UpdateReportsDictionary() function in an installation script to perform the second part of the update process. If you haven’t made any database changes or don’t have an input file, we still recommend performing the second part of the update because it performs some “cleanup” operations on the reports dictionary.

The exception script is a form-level procedure that is called each time an exception occurs during the update process. Typically, you will save the exception information to a log file. This procedure must have the following parameters:

The progress script is a form-level procedure that is called periodically during the update process. This procedure must have the following parameters:


Documentation Feedback