Custom Report Layout and using different company logos
wolfulium
Member Posts: 30
Hello, I have a task to create a report (using Word). I have a company that has two different logos. The company logo is determined by the company code. The "picture" field is the main picture and the "other co picture" field is the alternate picture. What I need is for the report to pick the proper picture based on the company code.
Company Code: Co1 - Picture - Co1 Picture
Company Code: Co2 - Other Co Picture - Co2 Picture
If that makes sense. Currently in the microsoft word report, the XML mapping is set for the Picture field, but I cannot figure out how to dynamically pick the proper field.
Company Code: Co1 - Picture - Co1 Picture
Company Code: Co2 - Other Co Picture - Co2 Picture
If that makes sense. Currently in the microsoft word report, the XML mapping is set for the Picture field, but I cannot figure out how to dynamically pick the proper field.
0
Answers
-
IF Cust."Global Dimension 1 Code" = 'OTHERCO' THEN BEGIN CompanyInfo.CALCFIELDS(CompanyInfo."Other Co. Picture"); CLEAR(CompanyInfo.Picture); FormatAddr.Company(CompanyAddr, CompanyInfo); END ELSE BEGIN IF Cust."Global Dimension 1 Code" = 'CO' THEN BEGIN CompanyInfo.CALCFIELDS(CompanyInfo.Picture); CLEAR(CompanyInfo."Other Co. Picture"); FormatAddr.Company(CompanyAddr, CompanyInfo); END; END;
So here is the code I came up with, the bottom portion actually shows the picture. That is the default picture that is in the Picture column of the table, the first part goes through and updates the address but does not show any picture.
So, my next question is.... does anyone know why?0 -
Formataddress doesn't take care op the picture.
Make a new variable and fill it with pic1 or pic2 in your code, and include the variable in the dataset, and use that instead.
You could also overwrite the picture field I guess.
CompanyInfo.Picture := CompanyInfo.OtherPicture;Follow me on my blog juhl.blog0 -
I do work so a company that has two different trading names. Dimension 1 is used to denote the business name. Two logos are used, one on top of the other with a small offset. The logos visible property is set based on the value of dimension 1.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 329 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