Footers at bottom

RaulRaul Member Posts: 14
edited 2000-03-22 in Navision Financials
Hi All,

I'm having a problem when I use more than one footer
placed at the bottom of the page.

I'm trying to create a multipage report with a
footer outputed in the first page and another one
for the next.

Both footers must be at the bottom and I've assigned
them the PlaceInBottom property to 'TRUE'.

The way I use them is with the showoutput function,
but when it prints the second footer it creates a new
blank page (with the header).
I've changed all their sizes but nothing. <img border="0" title="" alt="" src="images/smiles/icon_sad.gif" />

Any suggestion.

Thanks in advanced,
Raúl.

Comments

  • John_TegelaarJohn_Tegelaar Member Posts: 159
    You can set multiple footers and use the page counter to show these or not. Sample:

    IF CurrReport.PAGENO = 1 THEN
    CurrReport.SHOWOUTPUT := TRUE
    ELSE
    CurrReport.SHOWOUTPUT := FALSE;

    John
  • krishnadkrishnad Member Posts: 36
    You might take the secont footer (drag/drop) and overlay the first footer. Then, add some logic to hide/display the controls of each footer to by setting the proverty visible to true or false depending on which set you want to display...

  • RaulRaul Member Posts: 14
    Hi both,

    The way that John has suggested is the way I've tryed
    all this time, but I think that this could be a little
    bug.

    The Krishnad's one should be the logical way to
    solve this problem but, I don't know how to
    manipulate the section controls via C/AL code.

    Does anyone know?
  • RaulRaul Member Posts: 14
    Hi both,

    The way that John has suggested is the way I've tryed
    all this time, but I think that this could be a little
    bug.

    The Krishnad's one should be the logical way to
    solve this problem but, I don't know how to
    manipulate the section controls via C/AL code.

    Does anyone know?
  • RaulRaul Member Posts: 14
    Sorry, I must be a bit drunk. <img border="0" title="" alt="" src="images/smiles/icon_biggrin.gif" />
  • jpjp Member Posts: 47
    As I recall, Navision does some strange stuff when calculating footer space. If you have two footers that are flaged to print on the bottom of every page, and you want to print the first footer, you must have enough space of both footers to appear, even if you are going to supress the second footer. If you don't have enough room for both footers, Navision will eject the page.

    The scheme that krishnad mentioned is the only way to accomplish what you want.
    -jp
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    I always thought it was impossible in a report to use the VISIBLE-property of a control. Was I wrong all the time?
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • krishnadkrishnad Member Posts: 36
    Upon further research, I found out that this technique works on forms but not on reports. I have done this on forms a few times but never on reports.




  • John_TegelaarJohn_Tegelaar Member Posts: 159
    I have tested the way I posted with version 2.01 and 2.5, and both work the way it is supposed to be.

    Take care, however, to avoid any blank space between one footer and the next, or between the footer and the bottom of the page in the design mode (in other words, "pull" the next footer against the previous one). Looks like Navision does suppres labels/textboxes when ShowOutput is false, but not the "white space" of empty lines.

    Otherwise, show the code you have been using so far. Perhaps one of us can see what's wrong with it.

    John
  • RaulRaul Member Posts: 14
    I've solved it using one footer and text controls( showing blank if it's not the right page), but I'm really interested on how krishnad can identify the control objects with forms.

    Could you teach me? :-)

    Thanks.
  • krishnadkrishnad Member Posts: 36
    It'pretty simple.

    1. On the form, right-click the object that you want to show visible/invisible etc. Select Properties.

    2. Rename the control ( such as myPhoneNumber ) if the control name starts with <Control>. The default name for some of the controls are <Contro1>,<Control2> etc. This is important for unless you rename the controls you want to manipulate, they won't show up on the list of controls... No need to rename the field names.

    3. Select the trigger that you want to use (such as "OnAfterGetCurrRecord()")and...
    a. <F5>
    b. Select currform
    c. Select Controls
    d. Highlight the control
    e. Click on the "Right Arrow" at the bottom
    f. Select "Properties"
    g. Select the property that you want to manipulate.

    such as:

    IF "Customer No." <> '' THEN BEGIN
    CurrForm."Customer Icon".VISIBLE(TRUE);
    CurrForm.SalesOrderIcon.VISIBLE(TRUE);
    CurrForm.InvoiceBitMap.VISIBLE(TRUE);
    END ELSE BEGIN
    CurrForm."Customer Icon".VISIBLE(FALSE);
    CurrForm.SalesOrderIcon.VISIBLE(FALSE);
    CurrForm.InvoiceBitMap.VISIBLE(FALSE);
    END;
    IF ( STRPOS( "Status Code", 'OEM' ) > 0 ) OR ( STRPOS( "Status Code", 'FIT' ) > 0 )THEN BEGIN
    CurrForm.MarketGroups.VISIBLE(TRUE) ;
    CurrForm."School Groups".VISIBLE(FALSE) ;
    CurrForm.GenComments.VISIBLE(FALSE);
    CurrForm.ContactsSubform.FORM.ShowComments( TRUE ) ;
    END ELSE BEGIN
    CurrForm.MarketGroups.VISIBLE(FALSE);
    CurrForm."School Groups".VISIBLE(TRUE) ;
    CurrForm.GenComments.VISIBLE(TRUE);
    CurrForm.ContactsSubform.FORM.ShowComments( FALSE ) ;
    END ;
  • RaulRaul Member Posts: 14
    You're right, very easy.
    thanks. <img border="0" title="" alt="" src="images/smiles/icon_smile.gif" />
Sign In or Register to comment.