Report: Double header with Integer dataitem.

Maria-SMaria-S Member Posts: 90
Hello, Navision Gurus!

Could you please advice me how to make my report.

I have two intended Integer dataitems, for the second one I have the Header and Body sections. I have set the PrintOnEveryPage property to Yes on this Header. And now it prints this header two times in some cases (as you can see on the attached screenshot).

I tried to turn the PrintOnEveryPage off but in this case it obviously does not show the header on each page.
I also tried to add the Transheader section, but in this case the header is not printed on the next page if the previous page ends between the header and the first line of body.

This is the code of the sample report I made to ensure that the trouble is not caused by other reasons.

Thank you in advance!
OBJECT Report 50004 Test
{
  OBJECT-PROPERTIES
  {
    Date=09/22/10;
    Time=[ 9:41:57 PM];
    Modified=Yes;
    Version List=;
  }
  PROPERTIES
  {
  }
  DATAITEMS
  {
    { PROPERTIES
      {
        DataItemTable=Table2000000026;
        DataItemTableView=SORTING(Number)
                          WHERE(Number=FILTER(1..60));
      }
      SECTIONS
      {
        { PROPERTIES
          {
            SectionType=Header;
            PrintOnEveryPage=Yes;
            SectionWidth=9300;
            SectionHeight=846;
          }
          CONTROLS
          {
            { 1000000000;Label  ;0    ;0    ;3450 ;846  ;FontSize=9;
                                                         FontBold=Yes;
                                                         CaptionML=ENU=Integer Header }
            { 1000000004;TextBox;7800 ;0    ;1500 ;423  ;SourceExpr=CurrReport.PAGENO }
            { 1000000005;Label  ;6300 ;0    ;1500 ;423  ;CaptionML=ENU=Page }
          }
           }
        { PROPERTIES
          {
            SectionType=Body;
            SectionWidth=9300;
            SectionHeight=423;
          }
          CONTROLS
          {
            { 1000000001;TextBox;0    ;0    ;6300 ;423  ;SourceExpr='Integer Body = ' + FORMAT(Integer.Number) }
          }
           }
      }
       }
    { PROPERTIES
      {
        DataItemIndent=1;
        DataItemTable=Table2000000026;
        DataItemTableView=SORTING(Number)
                          WHERE(Number=FILTER(1..6));
        DataItemVarName=Integer2;
      }
      SECTIONS
      {
        { PROPERTIES
          {
            SectionType=Header;
            PrintOnEveryPage=Yes;
            SectionWidth=9300;
            SectionHeight=846;
          }
          CONTROLS
          {
            { 1000000003;Label  ;1950 ;0    ;3450 ;846  ;FontSize=9;
                                                         FontBold=Yes;
                                                         CaptionML=ENU=Integer 2  Header }
          }
           }
        { PROPERTIES
          {
            SectionType=Body;
            SectionWidth=9300;
            SectionHeight=423;
          }
          CONTROLS
          {
            { 1000000002;TextBox;1950 ;0    ;6300 ;423  ;SourceExpr='Integer 2  Body = ' + FORMAT(Integer2.Number) }
          }
           }
      }
       }
  }
  REQUESTFORM
  {
    PROPERTIES
    {
      Width=9020;
      Height=3410;
    }
    CONTROLS
    {
    }
  }
  CODE
  {

    BEGIN
    END.
  }
}

Comments

  • kinekine Member Posts: 12,562
    If possible, try to defie the header for the first dataitem (it depends on which data you want to have there) or add new integer dataitem between them as a PageLoop (as it is used in standad reports, with filter 1..1).
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Maria-SMaria-S Member Posts: 90
    Thank you, Kine.
    I will try this and come back with results.
Sign In or Register to comment.