Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

DB Image size needed after auto resizing

edited July 2009 in General
Have a report, that has a DBImage component. Simple enough. Now, I
need to move items to the right of the image based on the size of the
logo. So, I tried placing code in different places that would read the
width of the component, then move the items to the right based on this
size. Not a problem I thought. The issue is it will not move the
items to the right unless I run the report twice. I have tried
twopass, on draw commands, I don't know what I am doing anymore. Any
ideas? It is actually printing on the header band and the other
components have to move are in the same band. It seems like it does
not get the adjusted size until after it prints for the first time. At
least that what it shows in the preview. As, if I preview it twice or
more, it is fine.

--
Thanks,
Chris Starre

Comments

  • edited July 2009
    Hi Chris,

    Which event are you attempting to move the position of the other objects?
    Try using the Band.BeforePrint event to determine the size of the image and
    then reassign the position of the other components. If you are waiting
    until the image prints, it may be too late and the drawcommands may already
    be sent to the page.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2009
    Nico Cizik (Digital Metaphors) wrote:


    I was just in the process of writing you back to tell you that it did
    not work, then it dawned on me. I load the rtm from another location
    when I load the program. This allows for them to update it/makes
    changes. Anyway, it did not have the image field set to autosize. So,
    when I was in the program, I saved the new rtm to that location and it
    worked fine. That must be why it did not adjust the other fields. It
    is always something. Not sure why it worked on the second preview, but
    at this point, don't really care. If you know what I mean.

    Thank you for the response, at least it helped jog my memory, what's
    left of it.

    --
    Thanks,
    Chris Starre
This discussion has been closed.