Occasionally,
we may need to update a custom report layout that is used on a report. This is
required when there has been a design change to the report's data set, for
example, a field that is used in the layout has been removed from the report
data set. If a report layout requires updating, we will get an error message
when we try to preview, print or save the report.
We can automatically update a report layout from the error
message that appears when we run the report or, in advance of running reports, we
can update specific report layouts or all custom report layouts that might be
affected by dataset changes.
We also have the option to test updates without applying the
required changes to the custom report layouts. This enables us to see what
changes will be applied to the report layout and identify possible issues in
the process. From the test results, we can open the custom report layouts
directly for editing to fix any issues. Microsoft recommends that we test the
report layout update before we apply the updates.
Not all report dataset changes can be automatically updated in
the report layouts. When we choose to update or test the custom report layout
updates, Microsoft Dynamics NAV scans the custom report layouts that are stored
in the database and compares them to their corresponding dataset design. Some
changes will require that we manually edit the report layout.
To update a custom
report layout from the error message when we run a report
- To update report layout from
the error message that we get when we run a report, choose the Yes button
on the error message.
The system will attempt to update the layout. If the update is
unsuccessful, then we get an error message about a condition that must be fixed
To
update a specific custom report layout
1. In
the Search box, enter Custom
Report Layouts, and then choose the related link.
2. In
the Custom Report Layouts window, select the layout that we want
to update, and then on the Actions tab, choose Update
Layout.
The
system will attempt to update the custom report layout to dataset changes. If
no errors occur, then the update is applied to the report layout. If errors
occur, then a message that contains the errors appears. We will then have to
manually edit the custom report layout to fix the error.
To
update all custom report layouts for the company
1. In
the Search box, enter Report
Layout Selection, and then choose the related link.
2. In
the Report Layout Selection window, on the Actions tab, choose
Update All Layouts.
The
system will attempt to update the custom report layouts to dataset changes. If
no errors occur, then the update is applied to the report layouts. If errors
occur, then a message that contains the errors appears. We will then have to
manually edit the custom report layouts to fix the error
To
test custom report layout updates
1. In
the Search box, enter Report
Layout Selection, and then choose the related link.
2. In
the Report Layout Selection window, on the Actions tab, choose Test
Layout Updates.
Microsoft
Dynamics NAV validates the changes to the report layouts but does not apply the
updates. A Report Layout Update Log window appears that provides the
status a potential updates for each report layout. If there are errors for a
report layout, we can access the report layout directly for editing from the
message to fix any issues.
Limitations
of the Custom Report Layout Update
There
are several types of changes that the automatic update can apply to custom
report layouts, for example, a field that is used in the layout has been
removed from the report data set. However, the automatic update cannot handle
the following changes to a report dataset.
1.
Deleted fields, labels, or data items.
2.
Duplicate field names in the report layout after a field has been
renamed in the dataset. This should be treated as a design error.
3.
Upgrade scenarios where there are multiple iterations of a report
layout that causes multiple rename actions on the same fields, labels or data
items.
If
the update process detects any one of these issues, the update cannot be
applied. We will have to fix the issues manually, for example by editing the
report layout in Word, or programmatically by using upgrade codeunits.
Fixing
Errors
If we
get an error message when we update or test report layout updates, we most
likely will have to modify the report layout to fix the problem. Read the error
message to help determine the cause of the problem.
The
most typical problem occurs when a field that is used on the layout has been
removed from the report dataset. In this case, we will see a line in the error
message that states that an item has been removed. To fix this issue, we will
have to modify the layout and remove the field in question.
After we modify the layout, try to
update the layout again.
No comments:
Post a Comment