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.
0
Answers
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?
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;