DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

report image doesn't show when a certain bottom cordinate is exceeded

Solved!
Go to solution

Hi All,

 

I am creating DIAdem Reports using the script functions. Since the update to DIAdem 2015 (I belive) there is an error that didn't occur before:

When I add a new Image to the report and the bottom coordinate is less than a certain value (~50...60) the image is displayed just fine. However if the bottom coordinate exceeds this value the image won't be displayed (see the attached example script)

 

Thanks in advance

    Christoph

0 Kudos
Message 1 of 4
(3,930 Views)

Hi again,

 

I just noticed that there is a similar problem with the Left and Width parameters of the images. When defining the pictures left border and width by script the resulting actual width seems to be calculated by this formula:

Widht_actual = 50 - Left_fromScript + Widht_fromScript

 

For example when I define an images coordinates like this:

myCurrImg.UseOriginalRatio = true
myCurrImg.Position.ByBorder.Width   = 30
myCurrImg.Position.ByBorder.Bottom  = 10
myCurrImg.Position.ByBorder.Left    = 40

the image displayed in the report will have the following coordinates:

X = 40 (Left)

Y = 10 (Bottom)

Width = 40

 

This leads to the image disappearing as soon as 50 - Left_fromScript <= - Widht_fromScript

 

I could live with that however it seems to be wrong from my point of view.

Also I think a similar effect causes the image to disappear when the bottom coordinate is too big. As I want to keep the original aspect ratio I can't influence the Height of the image to counteract the effect.

 

Unfortunately this behaviour can not be reproduced by the example code I attached to the previous post.

 

Can anybody make any sense of this?

 

Regards,

    Christoph

0 Kudos
Message 2 of 4
(3,907 Views)
Solution
Accepted by topic author FraCh

Hi Christoph,

 

Position properties change if related properties change.

For example if you change Height of a picture to 100 %, Top and Bottom changes to 0 % each.

If you change Bottom property to 60 % like in you example script, Height + Top must be 40 %.

 

I hope this screenshot with your source code helps understanding the problem:

 

Position.png

 

If height or width property is zero, no image will be displayed!

I suggest to only set two properties for one dimension (e.g Top and Height or Top and Bottom).

If you only set one out of three properties, image position is not fully defined by the user but by some DIAdem default values.

 

Regards

Christian

Christian
CLA, CTA, CLED
0 Kudos
Message 3 of 4
(3,848 Views)

Hi Christian,

 

Thank you very much. I figured the adaption of the height parameter was covered by the UseOriginalRatio = true, so I didn't even think height could be a problem.

 

Regards,

    Christoph

0 Kudos
Message 4 of 4
(3,812 Views)