When “Size and position” won’t do what you want.

Monday 6 June 2016 @ 2:57 pm

Whenever you want to give Crystal Reports a specific coordinate for an object, you can right-click on the object and use the “Size and Position” dialogue.  Here you can enter the exact XY coordinates for the upper left corner and then enter the height and width.

In the older versions of CR I wrote about a bug in this screen.  That problem was fixed in CR 2008. But I just noticed that CR 2008 and other newer versions (up to the brand new CR 2016) have their own bugs related to that same dialogue.

1) Namely, if you enter a number that is just slightly different from the number already there, the object doesn’t move and the entry is ignored.  There is a minimum amount of change required before any box will accept a new value, and it appears to be .008.

So, say I have an object whose x value is 2.494 and I want to change it to 2.5.  I enter 2.5 and hit OK and it appears that the value was accepted.  But if I go back in and check the X value it is still 2.494.  The box will take .255 but not .250 because the change has to be .008 or greater. But you can get Crystal to take the value you want if you move the object slightly before you try to put in the value. For instance, if you are trying to change the X value, just his  [CTRL-Left Arrow] a few times.  This will move the object to the left. Now you should be able to put in the 2.5 because the new position of the object should be more than .08 away from position 2.5

2) This works great in CR 2008, but when I tested this in the new CR 2016 I found a different bug that wasn’t in CR 2008. When you enter a new Y value it adds the difference between the old Y value and new Y values to the height value.  Sounds like someone used the wrong variable name in the internal CR code.  This bug isn’t in CR 2008, and Ian Cartwright of Vero Software tested CR 2011 and doesn’t see the behavior there. I don’t have CR 2013 to test so I don’t know if that version is affected.









Leave a Reply

Jeff-Net
Recrystallize Pro

Crystal Reports Server