Skip to Content
Dec 02, 2020 at 07:32 PM

Formatting and alignment issues in header with crystal reports


I have a subreport set up as follows:

There is a Width Adjustment formatting formula for the Results header in Details b as below

The X Position adjustment is:

if {@numberOfSpecifications} = 0 then 1000 else 0

The same formula for Width adjustment in Details c under ResultNameandUnits.

Everything works fine when the setting is as above.

HOWEVER, when I change the Table.Field under the Results header in Details c section to a formula: @format Result

It works fine if there is a value under the Specifications header i.e. {@numberOfSpecifications} <> 0. However, when the {@numberOfSpecifications} = 0, the Specifications column is suppressed and only the Results column is shown – which is fine so far.

The only problem is that in the above scenario the Results header moves to the right and does not align with the values below. See example report below

Why does adding a formula change the header’s position. I am really baffled.


pic1.png (27.5 kB)
pic2.png (25.9 kB)
pic3.png (26.9 kB)
pic4.png (16.8 kB)