Ms Word Layout Pictures

RazansRazans Member Posts: 2
edited 2015-09-28 in NAV Three Tier
Hi,

my problem is with word layout pictures.
I have a repeating layout with item information and item picture(TempBlob).
All is fine until an item has no picture, ofc. the TempBlob has no value, but Word layout takes the previous picture, insted of leaving it empty.
(if i remember correctly, the same issue was with dataport imports, where if some line had fever values it would fill the empty ones with values from the previos line, but reset and init solved that)

I dont know how to solve this, maybe some one has had the same problem.

Thank in advance for every replies.

Comments

  • gerdhuebnergerdhuebner Member Posts: 155
    edited 2016-06-23
    Yes, I have exactly the same problem with NAV 2016, now. Obviously nobody else really uses NAV Wordlayout in connection with item pictures for sales quotes, e. g.
    A CLEAR for the TempBlob field does not work. As a workaround, instead of clearing, I changed the TempBlob field into a small (1 pixel) white picture using the COPYSTREAM function.
    It looks like this is a bug in Word 2013, where the picture from the above table row is copied, if one manually klicks on the plus sign of a repeater control (see gregmaxey.mvps.org/word_tip_pages/contentcontrol_enhancements_word_2013.html, e. g.
    The picture in the word repeating section content control is only updated, if it is not empty (null, etc.)
  • chrisdfchrisdf Member Posts: 82
    Hi,
    I have run into a problem using Word layouts for sales quotes where I include a picture of the item on the line.
    I dropped a picture content control into a column on the repeater but the picture gradually shrinks as each line of the report is printed.
    Has anyone seen this behaviour and is there a setting for the Picture Property or the Table Property that will overcome this??
  • chrisdfchrisdf Member Posts: 82
    Hi,

    Further to my comment above:
    1. If I insert a fixed image within the repeater control - no problem.
    2. If I insert a Picture Content control (that outputs the same image each time) - no problem.
    3. If I insert a Picture Content control with a different image on each row then that is when the image starts to shrink as the rows are output.

    So it seems like Word is adjusting the scale of the image each time.

    Has anyone successfully done such a report (Order Confirmation/Quote etc.) using the product image within the repeater control??

    Suppose the answer is to revert to RDLC - lost a lot of time chasing this one!
  • chrisdfchrisdf Member Posts: 82
    Finally solved this .. the problem is as follows:

    Bearing in mind the originally reported problem, it is necessary to output a blank image when an Item does not have a picture. However, if the Length, Width and DPI of that Image is not the same as the Picture before then the next image in the report shrinks and gets worse each time the "Blank" image is used.

    Solved it by either -
    a) Use a blank image at same dimension as other images.
    b) Use a rescaling routine (did mine in dotnet) to dynamically resize all images to the same Height, Width, DPI prior to output.

    Noticed also that the Word Picture Content control does not display all of the image if the aspect ratio of the Content Control is not the same as the aspect ratio of the source image. None of the picture properties help this - even the one you untick to lock the aspect ratio.
  • gerdhuebnergerdhuebner Member Posts: 155
    These effects like "shrinking pictures" or repeating the last image, though the actual image (blob) has been cleared, are due to the NAVWordXMLMerger Addin. They will not occur, if standard Word xml parts are used. (see https://massivedynamicsblog.wordpress.com/2016/09/08/wordlayout-revisited/, e. g.)
  • gerdhuebnergerdhuebner Member Posts: 155
    In the meantime, an improved Wordlayout+ tool is available, which cures the problems with image controls. Further information and download link here:
    https://massivedynamicsblog.wordpress.com/2016/09/15/wordlayout/
Sign In or Register to comment.