Footer Logo

axBobSEaxBobSE Member Posts: 17
edited 2008-06-17 in Navision Financials
Hi, :) to start with I just want to say that I have no prior experiance with navision nav but I been given a task to add a image at the buttom of a Invoice report.

looking around in here I figured out how to display a image on a report.
have table called Image File (int field) (blob field) where I got a picture imported into, I made a dataItem for the table and from that created a new footer section for that.

on the footer section I set a picturebox and set SourceExpr to my dataItem

on the dataitem I got some code to pict the right image from the table
SETRANGE("Entry No.", 2);
CALCFIELDS(FileImage);

so now its all displade and is working fine on the report, so far so good.

I want the footer to be on every page at the buttom, so for the section footer I set the proberties like this
PrintOnEveryPage yes
PlaceInBottom yes

now my problem is that if its a big invoice with alot of items on it my footer will be pushed down to page 2 and not be on page 1 there are often no text on page 2 either just my image at the buttom?

So question, Is there a way to have the image on the buttom of every page w/o changing things to the original report? since as I said I never worked with nav before so wanna make small changes to start with.

[Edit]
I guess what im asking is: Is there a way to make a page footer rather than just a section footer?

[Edit ]Changed Subject to [Solved] and changed Question to Logo (for better searching)

Answers

  • DenSterDenSter Member Posts: 8,307
    Footers have a property called PrintOnEveryPage, is that what you're looking for?
  • DaveTDaveT Member Posts: 1,039
    Hi axBobSE,

    What you need is to create/amend a Transfooter section and put the image in there as well


    Welcome to Nav (and Mibuso) :mrgreen:
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • axBobSEaxBobSE Member Posts: 17
    Footers have a property called PrintOnEveryPage, is that what you're looking for?

    ya I allready tried that and it dosnt seem to work, for instance if I cut down the image so it fits, so it always gets printed on a single paged invoice then if I in sortings write "F1000001..F1000005" to get printed more than 1 invoice the Image will only be printed on the last of the 5 pages (and if the image is in its full size it will be printed at an empty 6th page.
    What you need is to create/amend a Transfooter section and put the image in there as well
    If I add another section "<bomLogo>,TransFooter(1)" and put the same image in that as in the "<bomLogo>,Footer(2)"

    I get the same effect as above only now the image wont show on a small invoice (I think its due to the amount of lines the image takes up in the 2 footers?) but takes a blank page and puts it at the buttom.
  • DaveTDaveT Member Posts: 1,039
    Hi axBobSE,

    As Daniel says check all the sections for the PrintOnEveryPage property. Also have you the image in the correct footer. The footer only prints after all records in a dataitem - sound like you have this in a Sales Header section which would only print after all invoice printed (as described) - try putting it in the sales line footer.

    Hope this helps
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • axBobSEaxBobSE Member Posts: 17
    http://2ryyoa.bay.livefilestore.com/y1pkPr8j38ouDx5Q9okQCx7DEtFyRRSi7tcYpN4VxzG5jUziDAQ_W1Xa3erV-Vh50TZ0ycr7FKeWchCXCWhm05G6w/report.PNG
    Image of the report section: (incase it explains something I left out its not an english gui (ja = yes))

    I cant put the image in one of the other sections, when I select "Field Menu" in a different section I can only pick the fields related to that dataitem.

    my Image is placed in a seperate table called Image File it contains 2 fields, (Entry No. [int] FileImage [BLOB])
  • DaveTDaveT Member Posts: 1,039
    Hi axBobSE,

    I now see your problem. Just to explain - you can create controls to print than are not related to a dataitem i.e. you can put the logo in the Salesline footer. For example you can create a variable for the BOMLogo of type record and retrieve the record (use get or find). Then in the section insert a textbox control using the toolbox icon (or cut and paste an existing) and modify the property SourceExpr (using assistedit is useful here).

    I would also recommend reading the Application Developer Guide w1w1adg.pdf in the Doc directory of your Nav CD/DVD.

    Hope this helps.
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • axBobSEaxBobSE Member Posts: 17
    the salesline footer is only ment to be printed on the last page eg
    if the body of the salesline(s) extend over 1+ pages, the salesline footer arnt ment to be on the first pages. So I cant put the logo in salesline footers.

    the logo is really more of a name and contact info its ment as a kind of watermark for each page. Thats why I created its own footer

    *Im "guessing" that even though my footer is set to print on every page it wont be printed because the current page (including the footer) dosnt include enugh empty lines for the image to be printed.

    So when its finished printing the invoice and comes to my new footer it sees that it have to print it but there is no room so it goes to page 2.



    if I put the image in a headder (that always are on every page) and give the image x.y for the buttom of the page, will it then mage a huge empty space and force the report into an eternal loop atempting to write the sales lines but not able to due to it creating a new headder with a image at the buttom spanning over the entire page? :-s
  • DaveTDaveT Member Posts: 1,039
    Hi axBobSE
    axBobSE wrote:
    the salesline footer is only ment to be printed on the last page eg
    if the body of the salesline(s) extend over 1+ pages, the salesline footer arnt ment to be on the first pages.
    This is correct but you can also add a transfooter section which is designed to print a footer when a section crosses over a page.

    A completly different solution is to print to pdf and mege in the watermark from another file. I have seen a post explaining how to do this but haven't tried it myself.
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • axBobSEaxBobSE Member Posts: 17
    Ok :D now I got it working as I wanted.

    as you sugested I tried to add a fooder to one of the allready excisting bodies (sounds macabre lol) on the picture I posted there was a "heltal" (int) and it was named "sideløkke" (pageloop), so I added a footer to that.

    As you sugested I created a global variable called
    name "testImagebom"
    type "Record"
    subtype "File Image"

    (File Image is a Table containing 2 fields a int and a BLOB)
    int "Entry No."
    BLOB "FileImage"

    then I put a picturebox, into "sideløkke footer(4)"
    on properties for the picturebox I put SourceExpr = TestImagebom.FileImage

    and on the report in "Salgsfakturahoved - OnPreDataItem()" I added
    testImagebom.RESET;
    testImagebom.SETRANGE("Entry No.", 2);
    IF testImagebom.FIND('-') THEN BEGIN
    testImagebom.CALCFIELDS(FileImage);
    END;
    

    and ofc sat the proberties on the footer to
    PrintOnEveryPage Yes
    PlaceInBottom Yes

    //Thanks DaveT
  • DaveTDaveT Member Posts: 1,039
    Hi axBobSE,

    Getting document layouts with footers and transfooter are the trickest to get right - Well done. :mrgreen:

    Can you amend the original subject title to include [Solved]
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • DenSterDenSter Member Posts: 8,307
    Good work Bob, Dave's right, this report crap is very tricky :mrgreen:
Sign In or Register to comment.