NAV 5.0 SP1 - How to add more than 1 Logo to CompInfo Table?

stormbolt81stormbolt81 Member Posts: 11
edited 2013-01-08 in NAV Three Tier
Dear All,

I have been asked to add a few more logos so that it can be printed out on Reports, e.g. Company Logo, ISO Logo, Member of Certain Professional Body and a few other recognition awards my company has gained over the years.

I have added 1 Coloured Picture for our Company Logo (so we can print out on Reports, e.g. Sales Quotation) in the Company Information.

Could anyone kindly advise how I could use the same method or any other alternatives to add in the logos (which are above 32kb bitmap files) for report printing purpose?

Thanks!

Regards,
Gerald

Comments

  • vijay_gvijay_g Member Posts: 884
    This requires to do some technical work around. :)

    You can search the forum for your reference to get the idea of how's the company logo stored in table and how's been printing in report.

    Hope this may help you.
  • stormbolt81stormbolt81 Member Posts: 11
    Hi Vijay,

    Thank you for your response.

    I have already managed to get the Company logo out on my reports via CalcFields...
    <CompanyInfo1.CALCFIELDS(Picture);>

    Since it works, I was wondering if I could modify the Company Information table to add another field, e.g. ISO Logo (field name), am I able to replicate the same CALCFIELD function within the report to that new field within the table? Sounds like a yes, but I do not know how to create another Import function that points to another field within the Company Information table.

    Hoping that someone could provide advice on this one =)
  • prateekarya2011prateekarya2011 Member Posts: 40
    I don't know is this the right practice or not but this works out -->
    Step 1 Add a new field to company info table for example 'picture_2',the data type of this should be blob.
    Step 2 GO to company information Form & add a new picture,For this you need to change the code written on menu item of Picture button -->
    New Code to be written is
    Step3
    PictureExists := Picture_2.HASVALUE;
    IF Picture_2.IMPORT('*.BMP',TRUE) = '' THEN
    EXIT;
    Step4
    The new piture will be imported & you can display this new pic by adding the code
    ComanyInfo.Calcfiields(Picture_2);
    Step 5
    New pic can be displayed in new picture box with source expression ->
    CompanyInfo.Picture;
  • clauslclausl Member Posts: 455
    Not sure why you post a NAV 5.0 question in the "NAV Three Tier", but if you were using a RDLC report, you would just import the logos into your report and then make a simple switch, which controls which Logo to show.

    /Claus Lundstrøm
    Claus Lundstrøm | MVP | Senior Product Manager | Continia.com
    I'm blogging here:http://mibuso.com/blogs/clausl and used to blog here: http://blogs.msdn.com/nav
    I'm also offering RDLC Report Training, ping me if you are interested. Thanks to the 700 NAV developers that have now already been at my training. You know you can always call if you have any RDLC report issues :-)
  • SavatageSavatage Member Posts: 7,142
    I don't know is this the right practice or not but this works out -->
    Step 1 Add a new field to company info table for example 'picture_2',the data type of this should be blob.

    That's what we did. We added a 2nd BLOB field called Picture2.
    Under Company Information->Picture we added 3 more menuitems for Importing, Exporting & Deleting "Picture2"

    **IMPORT
    OnPush()
    Picture2Exists := Picture2.HASVALUE;
    IF Picture2.IMPORT('*.BMP',TRUE) = '' THEN
      EXIT;
    IF Picture2Exists THEN
      IF NOT CONFIRM(Text001,FALSE) THEN
        EXIT;
    CurrForm.SAVERECORD;
    

    **EXPORT
    OnPush()
    IF Picture2.HASVALUE THEN
      Picture2.EXPORT('*.BMP',TRUE);
    

    **DELETE
    OnPush()
    IF Picture2.HASVALUE THEN
      IF CONFIRM(Text002,FALSE) THEN BEGIN
        CLEAR(Picture2);
        CurrForm.SAVERECORD;
      END;
    
Sign In or Register to comment.