0
votes

I have a report with parameter to select the name and a textbox with expression field name. Below text box the a dataset table.
When I run the report, by default it will return all name on the table and HIDE text box.
When I select name in parameter, it will return for that name and SHOW text box. I don't have any issue at this point.

BUT I do have problem that the textbox create a gap between header and the table WHEN I run the report by default (not select name in parameter). My goal is to some how REMOVE THE GAP so the table can move up right below header. ONLY show when name is select on parameter.

layout gap space OK

1
I think this is a case where an image would help explain your question.Dale K
I will upload image soonTsang
AFAIK that is not possible... I have seen a hack which apparently works, but I haven't tested it social.technet.microsoft.com/Forums/sqlserver/en-US/…Dale K
Thank you for your infoTsang

1 Answers

0
votes

You can do this as long as your table is not a matrix (as the column groups prevent you from merging cells).

Add a new row to the top of your table, then select all the cells in that row and merge them.

Now resize the single cell you just created so that it's roughly big enough to hold all the content.

Right-Click the cell and do Insert->Rectangle Now either add new controls or copy and paste your existing ones into the rectangle.

Right-Click the row header and select "Row visibility", set it to the expression you are currently using to show/hide your text boxes.

That should be it. I did a quick test to try it out and it works perfectly (in this simple scenario). I've put some background colours in just to make it clearer but this is what the design looked like...

enter image description here

The row visibility was simply set to my parameter value =Parameters!HideTopRow.Value=1 . The textboxes in the yellow section are just some arbitrary values from the dataset.

When I run with the option set to 0 I get this..

enter image description here

When I run with the parameter set to 1 I get this.

enter image description here