How to add an Image Logo to a Report

civik
Member Posts: 2
Hello, I try to find on this site, on others sites, I read the chapter 18 "Reports" of 8359B and I cant add a logo bmp or jpg or gif to a Navision Report.
I dont want to add an OCX or DLL to put an image on a report. I can convert it to any format.
Im tired to search.
Help me, please/
I dont want to add an OCX or DLL to put an image on a report. I can convert it to any format.
Im tired to search.
Help me, please/
0
Comments
-
Hello civik
Here are the steps on how to add company logo to any report.
Add a new global variable Companyinformation of type record subtype Company
information
Onprereport. add this
Companyinformation.get;
Companyinformation.calcfields(Picture);
Now go to the sections and add a picturebox. rightlick and go to properties for that picture box and search for property sourcexp.
Set the value to Companyinformation.Picture.
That's it.0 -
hi i'm attempting to make the same thing but i don't no how to found the Onprereport
i have opening the C/AL code window but i haven't got onprereport.
how can i do for add this ?
Please help me 8-[0 -
I have done a little search on the forum and i have found this
http://www.mibuso.com/forum/viewtopic.php?t=16502&highlight=onprereport0 -
I have follow all the instructions above for adding a logo on my new report. but my logo don't appaear ...
Here the step i have follow :
1-Adding a new Global variable named.with the following values :
name :CompanyInfo
DataType: Record
SubType :Company Information
2-Ading code in prereport trigger. I post the code :Documentation() Report - OnInitReport() GLSetup.GET; Report - OnPreReport() IF NOT CurrReport.USEREQUESTFORM THEN InitLogInteraction; BEGIN CompanyInfo.GET; CompanyInfo.CALCFIELDS(Picture); END; Report - OnPostReport() Report - OnCreateHyperlink(VAR URL : Text[1024]) Report - OnHyperlink(URL : Text[1024]) InitLogInteraction() LogInteraction := SegManagement.FindInteractTmplCode(6) <> ''; FindPostedShipmentDate() : Date NextEntryNo := 1; IF "Sales Cr.Memo Line"."Return Receipt No." <> '' THEN IF ReturnReceiptHeader.GET("Sales Cr.Memo Line"."Return Receipt No.") THEN EXIT(ReturnReceiptHeader."Posting Date"); CASE "Sales Cr.Memo Line".Type OF "Sales Cr.Memo Line".Type::Item: GenerateBufferFromValueEntry("Sales Cr.Memo Line"); "Sales Cr.Memo Line".Type::"G/L Account","Sales Cr.Memo Line".Type::Resource, "Sales Cr.Memo Line".Type::"Charge (Item)","Sales Cr.Memo Line".Type::"Fixed Asset": GenerateBufferFromShipment("Sales Cr.Memo Line"); "Sales Cr.Memo Line".Type::" ": EXIT(0D); END; SalesShipmentBuffer.RESET; SalesShipmentBuffer.SETRANGE("Document No.","Sales Cr.Memo Line"."Document No."); SalesShipmentBuffer.SETRANGE("Line No." ,"Sales Cr.Memo Line"."Line No."); IF SalesShipmentBuffer.FIND('-') THEN BEGIN SalesShipmentBuffer2 := SalesShipmentBuffer; IF SalesShipmentBuffer.NEXT = 0 THEN BEGIN SalesShipmentBuffer.GET(SalesShipmentBuffer2."Document No.",SalesShipmentBuffer2."Line No.",SalesShipmentBuffer2."Entry No." ); SalesShipmentBuffer.DELETE; EXIT(SalesShipmentBuffer2."Posting Date");; END; SalesShipmentBuffer.CALCSUMS(Quantity); IF SalesShipmentBuffer.Quantity <> "Sales Cr.Memo Line".Quantity THEN BEGIN SalesShipmentBuffer.DELETEALL; EXIT("Sales Cr.Memo Header"."Posting Date"); END; END ELSE EXIT("Sales Cr.Memo Header"."Posting Date"); GenerateBufferFromValueEntry(SalesCrMemoLine2 : Record "Sales Cr.Memo Line") TotalQuantity := SalesCrMemoLine2."Quantity (Base)"; ValueEntry.SETCURRENTKEY("Document No.","Posting Date"); ValueEntry.SETRANGE("Document No.",SalesCrMemoLine2."Document No."); ValueEntry.SETRANGE("Posting Date","Sales Cr.Memo Header"."Posting Date"); ValueEntry.SETRANGE("Item Charge No.",''); ValueEntry.SETFILTER("Entry No.",'%1..',FirstValueEntryNo); IF ValueEntry.FIND('-') THEN REPEAT IF ItemLedgerEntry.GET(ValueEntry."Item Ledger Entry No.") THEN BEGIN IF SalesCrMemoLine2."Qty. per Unit of Measure" <> 0 THEN Quantity := ValueEntry."Invoiced Quantity" / SalesCrMemoLine2."Qty. per Unit of Measure" ELSE Quantity := ValueEntry."Invoiced Quantity"; AddBufferEntry( SalesCrMemoLine2, -Quantity, ItemLedgerEntry."Posting Date"); TotalQuantity := TotalQuantity - ValueEntry."Invoiced Quantity"; END; FirstValueEntryNo := ValueEntry."Entry No." + 1; UNTIL (ValueEntry.NEXT = 0) OR (TotalQuantity = 0); GenerateBufferFromShipment(SalesCrMemoLine : Record "Sales Cr.Memo Line") TotalQuantity := 0; SalesCrMemoHeader.SETCURRENTKEY("Return Order No."); SalesCrMemoHeader.SETFILTER("No.",'..%1',"Sales Cr.Memo Header"."No."); SalesCrMemoHeader.SETRANGE("Return Order No.","Sales Cr.Memo Header"."Return Order No."); IF SalesCrMemoHeader.FIND('-') THEN REPEAT SalesCrMemoLine2.SETRANGE("Document No.",SalesCrMemoHeader."No."); SalesCrMemoLine2.SETRANGE("Line No.",SalesCrMemoLine."Line No."); SalesCrMemoLine2.SETRANGE(Type,SalesCrMemoLine.Type); SalesCrMemoLine2.SETRANGE("No.",SalesCrMemoLine."No."); SalesCrMemoLine2.SETRANGE("Unit of Measure Code",SalesCrMemoLine."Unit of Measure Code"); IF SalesCrMemoLine2.FIND('-') THEN REPEAT TotalQuantity := TotalQuantity + SalesCrMemoLine2.Quantity; UNTIL SalesCrMemoLine2.NEXT = 0; UNTIL SalesCrMemoHeader.NEXT = 0; ReturnReceiptLine.SETCURRENTKEY("Return Order No.","Return Order Line No."); ReturnReceiptLine.SETRANGE("Return Order No.","Sales Cr.Memo Header"."Return Order No."); ReturnReceiptLine.SETRANGE("Return Order Line No.",SalesCrMemoLine."Line No."); ReturnReceiptLine.SETRANGE("Line No.",SalesCrMemoLine."Line No."); ReturnReceiptLine.SETRANGE(Type,SalesCrMemoLine.Type); ReturnReceiptLine.SETRANGE("No.",SalesCrMemoLine."No."); ReturnReceiptLine.SETRANGE("Unit of Measure Code",SalesCrMemoLine."Unit of Measure Code"); ReturnReceiptLine.SETFILTER(Quantity,'<>%1',0); IF ReturnReceiptLine.FIND('-') THEN REPEAT IF "Sales Cr.Memo Header"."Get Return Receipt Used" THEN CorrectShipment(ReturnReceiptLine); IF ABS(ReturnReceiptLine.Quantity) <= ABS(TotalQuantity - SalesCrMemoLine.Quantity) THEN TotalQuantity := TotalQuantity - ReturnReceiptLine.Quantity ELSE BEGIN IF ABS(ReturnReceiptLine.Quantity) > ABS(TotalQuantity) THEN ReturnReceiptLine.Quantity := TotalQuantity; Quantity := ReturnReceiptLine.Quantity - (TotalQuantity- SalesCrMemoLine.Quantity); SalesCrMemoLine.Quantity := SalesCrMemoLine.Quantity - Quantity; TotalQuantity := TotalQuantity - ReturnReceiptLine.Quantity; IF ReturnReceiptHeader.GET(ReturnReceiptLine."Document No.") THEN BEGIN AddBufferEntry( SalesCrMemoLine, -Quantity, ReturnReceiptHeader."Posting Date"); END; END; UNTIL (ReturnReceiptLine.NEXT = 0) OR (TotalQuantity = 0); CorrectShipment(VAR ReturnReceiptLine : Record "Return Receipt Line") SalesCrMemoLine.SETCURRENTKEY("Return Receipt No.","Return Receipt Line No."); SalesCrMemoLine.SETRANGE("Return Receipt No.",ReturnReceiptLine."Document No."); SalesCrMemoLine.SETRANGE("Return Receipt Line No.",ReturnReceiptLine."Line No."); IF SalesCrMemoLine.FIND('-') THEN REPEAT ReturnReceiptLine.Quantity := ReturnReceiptLine.Quantity - SalesCrMemoLine.Quantity; UNTIL SalesCrMemoLine.NEXT = 0; AddBufferEntry(SalesCrMemoLine : Record "Sales Cr.Memo Line";QtyOnShipment : Decimal;PostingDate : Date) SalesShipmentBuffer.SETRANGE("Document No.",SalesCrMemoLine."Document No."); SalesShipmentBuffer.SETRANGE("Line No.",SalesCrMemoLine."Line No."); SalesShipmentBuffer.SETRANGE("Posting Date",PostingDate); IF SalesShipmentBuffer.FIND('-') THEN BEGIN SalesShipmentBuffer.Quantity := SalesShipmentBuffer.Quantity - QtyOnShipment; SalesShipmentBuffer.MODIFY; EXIT; END; WITH SalesShipmentBuffer DO BEGIN INIT; "Document No." := SalesCrMemoLine."Document No."; "Line No." := SalesCrMemoLine."Line No."; "Entry No." := NextEntryNo; Type := SalesCrMemoLine.Type; "No." := SalesCrMemoLine."No."; Quantity := -QtyOnShipment; "Posting Date" := PostingDate; INSERT; NextEntryNo := NextEntryNo + 1 END;
3- Addgin a picturebox and set the with soureexpr=CompanyInfo.Picture
There's something wrong ???
Please help me ^^ O:)0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions