on 12-02-2020 7:32 PM
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.
If I understand correctly, you're trying to make the header not show under certain conditions - is that correct?
Instead of playing with the width, I might try right-clicking on the object and going to "Format...", clicking on the formula button to the right of the Suppress checkbox (DO NOT check the checkbox!) and using the formula there to suppress the header instead of changing its width.
The other thing I see is that the width of the data objects in the column doesn't match the width of the column headers. If your pic4 is an image of the report as exported to another format, that can cause similar issues to this - you need to make sure that everything in a column is the same width and that the left and right sides line up as you move down the column.
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Dell. Will give this a go. I inherited this report from some else and working my way through it.
I tried your suggestion and it works perfectly. Got rid of all the width adjustment formulae and added the suppression as required.
Thanks a million for this
Geeta
The other thing you might want to try is create a new header formula and a detail formula that dynamically displays either results or specificaitons.
The header formula would output either "Results" or "Specifications" depending on whether the detail level formula for "results" contains data or not.
E.g the @results formula on the details would be:
If <code for results> <> 0 then <show results>
else if <code for specifications> <> 0 then <show specifications>
the header for results would be:
If Max(@results) <> 0 then "Results"
else if Max(@specifications) <> 0 "Specifications"
You can then simply suppress both the Header and detail formula for specifications using this code:
{@results} = 0
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.