Outreach - Gaps between objects
Posted by on 29 April 2014 04:19 PM
Report Designer - Causes for Gaps
Customers reported gaps between objects in Report Designer when they switched to the HTML-View. We have tried to reproduce this situation.
We mainly had the problem when we tried to put a picture box beside a RTF-Object. In many cases it leds to a gap of 2-3 cm.
To fix this issue (1) please check if there are any blank lines at the end of the RTF-document.
(2) When you use scripts for the picture box then ensure that the size of the drawn object is a bit bigger or at least has the same size than the size of the script. Just a calculated example: The value in script: 20X20. The size of the drawn square: 15X15. --> This example could lead to gaps. To fix it try to exchange the values: Script: 20X20. Square: >=20 for example 21X21. --> Now the gap shouldnt be as big as before. The pictrue will still have 20X20 because the script dominates. Caution! This is just an example to explain the problem. The size values and script values have different semantics so you have to guess the size of the drawn object.
(3) Also check if there are any active size scripts for the other objects.
(4) Gaps in Outreach can also happen by a mistake of the HTML-View. To exclude this approach, please send a test E-Mail to check if the gap is shown in the used E-Mail application. Every application uses his own HTML-Language. You will probably have to choose one application to optimize the E-mail for.
UPDATE: We have now developed a more user-friendly script. To exclude (2) exchange the script you are using with the script below.
If you use this script then there is no need to edit this script. For editing the size you can adjust it in the designer properties with "size". Please ensure that you keep the proportion of the original picture when you change the size. Please remember to change the scripts of your objects to "Picture_HtmlItemCreated".
Private Sub Picture_HtmlItemCreated(ByVal sender As Object, ByVal e As DevExpress.XtraReports.UI.HtmlEventArgs)
(For Staff:) The following line can be used to check the converted size. We recommend you not to use this line.
Copy the line and paste the script below "End Select". Change to HTML-View to monitor the converted size. It will be shown in windows Pop-ups.
System.Windows.Forms.MessageBox.Show("controlSize.Height " & controlSize.Height & " controlSize.Width " & controlSize.Width & " ~ convertedSizeHeight: " & convertedSizeH & " convertedSizeWidth: " & convertedSizeW)