Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

The "Customer – Labels" report (110) does not display the labels in the right place when you print the report in the RoleTailored client in Microsoft Dynamics NAV 2009


View products that this article applies to.

This article applies to Microsoft Dynamics NAV for all countries and all language locales.

↑ Back to the top


Symptoms

When you print the "Customer – Labels" report (110) in the RoleTailored client (RTC) in Microsoft Dynamics NAV 2009, the report does not display the labels in the right place. A new blank margin is displayed in each page. Therefore, the labels cannot be displayed in the right place.
This problem occurs in the following products:
  • Microsoft Dynamics NAV 2009 R2
  • Microsoft Dynamics NAV 2009 Service Pack 1 (SP1)

↑ Back to the top


Resolution

Hotfix information

A supported hotfix is now available from Microsoft. However, it is only intended to correct the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Microsoft Dynamics NAV service pack or the next Microsoft Dynamics NAV version that contains this hotfix.

Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Technical Support Professional for Microsoft Dynamics and related products determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

↑ Back to the top




Installation information

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

Note Before you install this hotfix, verify that all Microsoft Navision client users are logged off the system. This includes Microsoft Navision Application Services (NAS) client users. You should be the only client user who is logged on when you implement this hotfix.

To implement this hotfix, you must have a developer license.

We recommend that the user account in the Windows Logins window or in the Database Logins window be assigned the "SUPER" role ID. If the user account cannot be assigned the "SUPER" role ID, you must verify that the user account has the following permissions:
  • The Modify permission for the object that you will be changing.
  • The Execute permission for the System Object ID 5210 object and for the System Object ID 9015 object.


Note You do not have to have rights to the data stores unless you have to perform data repair.

Code changes

Note Always test code fixes in a controlled environment before you apply the fixes to your production computers.
To resolve this problem, follow these steps:
  1. Change the code in the Object Heading in the Customer - Labels report (110) as follows: 
    Existing code
    OBJECT Report 110 Customer - Labels
    {
    OBJECT-PROPERTIES
    {

    // Delete the following lines.
    Date=14/08/09;
    Time=12:00:00;
    // End of the lines.

    Version List=NAVW16.00.01;
    }
    PROPERTIES
    {
    CaptionML=ENU=Customer - Labels;
    Replacement code
    OBJECT Report 110 Customer - Labels
    {
    OBJECT-PROPERTIES
    {

    // Add the following lines.
    Date=15/02/11;
    Time=11:18:37;
    Modified=Yes;
    // End of the lines.

    Version List=NAVW16.00.01;
    }
    PROPERTIES
    {
    CaptionML=ENU=Customer - Labels;
  2. Change the code in the Properties in the Customer - Labels report (110) as follows:
    Existing code
    ...
    Version List=NAVW16.00.01;
    }
    PROPERTIES
    {
    CaptionML=ENU=Customer - Labels;
    }
    DATAITEMS
    {
    { PROPERTIES
    {
    ...
    Replacement code
    ...
    Version List=NAVW16.00.01;
    }
    PROPERTIES
    {
    CaptionML=ENU=Customer - Labels;

    // Add the following lines.
    OnPreReport=BEGIN
    GroupNo := 1;
    RecPerPageNum := 6;
    END;
    // End of the lines.

    }
    DATAITEMS
    {
    { PROPERTIES
    {
    ...
  3. Change the code in the Data Item Number 1 in the Customer - Labels report (110) as follows:
    Existing code 1
    ...
    LabelFormat::"36 x 70 mm (3 columns)",LabelFormat::"37 x 70 mm (3 columns)":
    NoOfColumns := 3;
    LabelFormat::"36 x 105 mm (2 columns)",LabelFormat::"37 x 105 mm (2 columns)":
    NoOfColumns := 2;
    END;

    // Delete the following line.
    NoOfRecords := COUNT;

    END;

    OnAfterGetRecord=BEGIN
    RecordNo := RecordNo + 1;
    ColumnNo := ColumnNo + 1;
    ...
    Replacement code 1
    ...
    LabelFormat::"36 x 70 mm (3 columns)",LabelFormat::"37 x 70 mm (3 columns)":
    NoOfColumns := 3;
    LabelFormat::"36 x 105 mm (2 columns)",LabelFormat::"37 x 105 mm (2 columns)":
    NoOfColumns := 2;
    END;

    // Add the following lines.
    NoOfRecords := COUNT;
    RecordNo := 0;
    // End of the lines.

    END;

    OnAfterGetRecord=BEGIN
    RecordNo := RecordNo + 1;
    ColumnNo := ColumnNo + 1;
    ...
    Existing code 2
    ...
    ColumnNo := 0;
    END ELSE BEGIN
    IF ColumnNo = NoOfColumns THEN
    ColumnNo := 0;
    END;
    END;

    ReqFilterFields=No.,Name;
    }
    SECTIONS
    ...
    Replacement code 2
    ...
    ColumnNo := 0;
    END ELSE BEGIN
    IF ColumnNo = NoOfColumns THEN
    ColumnNo := 0;
    END;

    // Add the following lines.
    IF ISSERVICETIER THEN
    IF ColumnNo = 0 THEN BEGIN
    IF Counter = RecPerPageNum THEN BEGIN
    GroupNo := GroupNo + 1;
    Counter := 0;
    END;
    Counter := Counter + 1;
    END;
    // End of the lines.

    END;

    ReqFilterFields=No.,Name;
    }
    SECTIONS
    ...
  4. Change the code in the Data Item Number 1 sections in the Customer - Labels report (110) as follows:
    Existing code 1
    ...
    { 81 ;TextBox ;13800;0 ;150 ;423 ;Name=ShowBody1;
    Visible=No;
    ForeColor=65535;
    SourceExpr=(ColumnNo = 0) AND (LabelFormat = LabelFormat::"36 x 70 mm (3 columns)");
    DataSetFieldName=ShowBody1 }
    }
    }
    { PROPERTIES
    {
    SectionType=Body;
    ...
    Replacement code 1
    ...
    { 81 ;TextBox ;13800;0 ;150 ;423 ;Name=ShowBody1;
    Visible=No;
    ForeColor=65535;
    SourceExpr=(ColumnNo = 0) AND (LabelFormat = LabelFormat::"36 x 70 mm (3 columns)");
    DataSetFieldName=ShowBody1 }

    // Add the following lines.
    { 85 ;TextBox;13650;0 ;150 ;423 ;Name=GroupNo1;
    Visible=No;
    ForeColor=65535;
    SourceExpr=GroupNo;
    DataSetFieldName=GroupNo1 }
    // End of the lines.

    }
    }
    { PROPERTIES
    {
    SectionType=Body;
    ...
    Existing code 2
    ...
    }
    { PROPERTIES
    {
    SectionType=Body;
    SectionWidth=20500;

    // Delete the following line.
    SectionHeight=3700;

    KeepWithNext=No;
    OnPreSection=BEGIN
    CurrReport.SHOWOUTPUT((ColumnNo = 0) AND (LabelFormat = LabelFormat::"37 x 105 mm (2 columns)"));
    END;
    ...
    Replacement code 2
    ...
    }
    { PROPERTIES
    {
    SectionType=Body;
    SectionWidth=20500;

    // Add the following line.
    SectionHeight=3384;

    KeepWithNext=No;
    OnPreSection=BEGIN
    CurrReport.SHOWOUTPUT((ColumnNo = 0) AND (LabelFormat = LabelFormat::"37 x 105 mm (2 columns)"));
    END;
    ...
  5. Change the code in the Global Variables in the Customer - Labels report (110) as follows:
    Existing code 1
    ...
    NoOfRecords@1002 : Integer;
    RecordNo@1003 : Integer;
    NoOfColumns@1004 : Integer;
    ColumnNo@1005 : Integer;
    i@1006 : Integer;
    FormatAddr@1007 : Codeunit 365;

    BEGIN
    END.
    }
    ...
    Replacement code 1
    ...
    NoOfRecords@1002 : Integer;
    RecordNo@1003 : Integer;
    NoOfColumns@1004 : Integer;
    ColumnNo@1005 : Integer;
    i@1006 : Integer;

    // Add the following lines.
    GroupNo@1008 : Integer;
    Counter@1009 : Integer;
    RecPerPageNum@1010 : Integer;
    // End of the lines.

    FormatAddr@1007 : Codeunit 365;

    BEGIN
    END.
    }
    ...
    Existing code 2
    ...
    </TableColumn>
    <TableColumn>
    <Width>6.15cm</Width>
    </TableColumn>
    </TableColumns>
    <Width>18.44cm</Width>
    </Table>
    </ReportItems>
    </Body>
    <BottomMargin>2cm</BottomMargin>
    ...
    Replacement code 2
    ...
    </TableColumn>
    <TableColumn>
    <Width>6.15cm</Width>
    </TableColumn>
    </TableColumns>

    // Add the following lines.
    <TableGroups>
    <TableGroup>
    <Grouping Name="Table1_Group1">
    <GroupExpressions>
    <GroupExpression>=Fields!GroupNo1.Value</GroupExpression>
    </GroupExpressions>
    <PageBreakAtEnd>true</PageBreakAtEnd>
    </Grouping>
    </TableGroup>
    </TableGroups>
    // End of the lines.

    <Width>18.44cm</Width>
    </Table>
    </ReportItems>
    </Body>
    <BottomMargin>2cm</BottomMargin>
    ...
    Existing code 3
    ...
    Return Value
    End Function
    </Code>
    <DataSets>
    <DataSet Name="DataSet_Result">

    // Delete the following lines.
    <Query>
    <CommandText />
    <DataSourceName>DummyDataSource</DataSourceName>
    </Query>
    // End of the lines.

    <Fields>
    <Field Name="CustAddr_1__1_">
    <DataField>CustAddr_1__1_</DataField>
    </Field>
    <Field Name="CustAddr_1__2_">
    ...
    Replacement code 3
    ...
    Return Value
    End Function
    </Code>
    <DataSets>
    <DataSet Name="DataSet_Result">
    <Fields>
    <Field Name="CustAddr_1__1_">
    <DataField>CustAddr_1__1_</DataField>
    </Field>
    <Field Name="CustAddr_1__2_">
    ...
    Existing code 4
    ...
    <DataField>CustAddr_3__8_</DataField>
    </Field>
    <Field Name="ShowBody1">
    <DataField>ShowBody1</DataField>
    </Field>
    <Field Name="ShowBody2">
    <DataField>ShowBody2</DataField>
    </Field>
    <Field Name="ShowBody3">
    <DataField>ShowBody3</DataField>
    ...
    Replacement code 4
    ...
    <DataField>CustAddr_3__8_</DataField>
    </Field>
    <Field Name="ShowBody1">
    <DataField>ShowBody1</DataField>
    </Field>

    // Add the following lines.
    <Field Name="GroupNo1">
    <DataField>GroupNo1</DataField>
    </Field>
    // End of the lines.

    <Field Name="ShowBody2">
    <DataField>ShowBody2</DataField>
    </Field>
    <Field Name="ShowBody3">
    <DataField>ShowBody3</DataField>
    ...
    Existing code 5
    ...
    </Field>
    <Field Name="Customer_No_">
    <DataField>Customer_No_</DataField>
    </Field>
    </Fields>
    <rd:DataSetInfo>
    <rd:DataSetName>DataSet</rd:DataSetName>
    <rd:TableName>Result</rd:TableName>
    </rd:DataSetInfo>
    </DataSet>
    ...
    Replacement code 5
    ...
    </Field>
    <Field Name="Customer_No_">
    <DataField>Customer_No_</DataField>
    </Field>
    </Fields>

    // Add the following lines.
    <Query>
    <CommandText />
    <DataSourceName>DummyDataSource</DataSourceName>
    </Query>
    // End of the lines.

    <rd:DataSetInfo>
    <rd:DataSetName>DataSet</rd:DataSetName>
    <rd:TableName>Result</rd:TableName>
    </rd:DataSetInfo>
    </DataSet>
    ...

Prerequisites

You must have one of the following products installed to apply this hotfix:
  • Microsoft Dynamics NAV 2009 R2
  • Microsoft Dynamics NAV 2009 Service Pack 1 (SP1)

Removal information

You cannot remove this hotfix.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

↑ Back to the top


Keywords: kbmbscodefix, kbnoloc, kbsurveynew, kbqfe, kbmbspartner, kbmbsquickpub, kb, kbmbsmigrate

↑ Back to the top

Article Info
Article ID : 2564120
Revision : 4
Created on : 9/26/2018
Published on : 9/26/2018
Exists online : False
Views : 253