ssrs report - textbox create gap space - reporting-services

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.

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...
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..
When I run with the parameter set to 1 I get this.

Related

Hiding a row if text box is hidden

I have a report that lists parts required for a job, and then within each part it has rows that show locations and quantities of parts on-hand. The main list has a header (part number, description, quantity) which is only shown once at the top because it is not within the grouping. However, the second header (on-hand quantity, location) is within the grouping so it repeats. I would like it to only show once.
I have tried using the hide duplicates property for the header text boxes, but this still leaves blank rows. I have also tried setting the row visibility using a comparison between ReportItem!lblOnHand.Value and Previous(ReportItem!lblOnHand.Value) but this gives me an aggregate error.
This is what the report is displaying now:
You need to set the row visibility rather than the individual text boxes. Right-click the row header to access the setting..
You should (untested) be able to use the same logic as you have now. If this does not work then you will need to test if the group is the first group and use that in the expression, something like...
=Fields!Partnumber.Value <> FIRST(Fields!Partnumber.Value, "myGroupOrDatasetNameHere")
The above would hide thew row if the part number in the current context is not the same as the first part number in the group or dataset name specified.

Filter in TextBox Expression SSRS

I have 5 visualizations in my rdl file. After each visualization I have a ABOUT Textbox which should be filled from a database table and it has html content to render.
Consider a table with 5 rows having visualization name and ABOUT Text.
<table><tr><th>visualization Name</th><th>About Text</th><th></th><th></th><th></th></tr><tr><td>Visualization1</td><td><B>Table1</B></td><td></td><td></td><td></td></tr><tr><td>Visualization2</td><td><I>Table2</I></td><td></td><td></td><td></td></tr><tr><td>Visualization3</td><td><B>Chart1</B></td><td></td><td></td><td></td></tr><tr><td>Visualization4</td><td><I>Chart2</I></td><td></td><td></td><td></td></tr><tr><td>Visualization5</td><td><B>PieChart1</B></td><td></td><td></td><td></td></tr></table>
I have created a DataSet which would pull all 5 rows along with 2 columns. And I want to link each row's AboutText field to each TextBox of individual visualization. Of course I'll have to use filters. But there is no option for adding filters in TextBox expression. And I don't want to create 5 separate DataSets for just rendering purpose.
How would I achieve this in SSRS 2016?
Create a tablix and put your visualisation in one row and your About Text in the next row as a child group. Set the child groups visibility to be toggled on the parent group and your will be able to expand and collapse the About Text row by clicking on a little + icon that will appear next to your Visualisation.
There are a few ways you could do this. One option is to add an ID column to your dataset. Then in each textbox you can use the Lookup function to get the appropriate label. Another option is to insert a table with one cell next to each visualization. You can use the Filter property on the table to control which label is shown.

Combining Cells in Locally Rendered Microsoft Report

I have a basic Tablix in my report that currently renders as follows:
These are steps in a manufacturing process with the clock number of the person who performed them with date performed in the last two columns. However, sometimes steps are combined and performed together. In the example above, steps 10-20 are performed together, and 30-40 are performed together. So I would really like the report to be rendered like this:
I do have a column in my data called "StepRange" which in the above example would be "10-20" for the first two rows and "30-40" for the third and fourth rows. So when the value of StepRange is alike, I know those rows are performed together and henceforth the last two columns should be combined. My example shows only two rows being combined at a time, but it could be any number.
How can I make my report look like the second example above instead of the first?
Single Tablix Method
Rather than literal conditional merging, you can set the border style of a textbox using an expression to achieve a similar effect. There are a few steps, but none of them are particularly involved.
Create a parent group for StepRange. Do not add a header or footer, and delete the added column without removing the group.
Make sure that your properties panel is visible on the right of your screen. If not, check the "Properties" checkbox under the View ribbon.
Click on your first detail TextBox and expand the "BorderStyle" property. Set the "Top" property to the following expression:
=IIF(RunningValue(Field!Step.Value,CountDistinct,"StepRange")>1, "None", "Solid")
Set the Bottom property to "None".
Set the expression of the detail TextBox itself.
Replace FIELDNAME with the appropriate field:
=IIF(RunningValue(Field!Step.Value,CountDistinct,"StepRange")>1, "", Field!FIELDNAME.Value)
Repeat this process for each detail TextBox.
You may need to create a dummy row at the bottom with a black top border if you do not have a summation row. (optional)
The expression only evaluates to "Solid" for the first Step value within each StepRange group, so subsequent rows do not have a top border and appear undivided.
Nested Tablix Method
Using a nested Tablix is more straightforward. I have had some issues with them, including some rendering hiccups. But in a report this simple that may not be an issue at all.
Set up your main Tablix to group on StepRange.
Either clear or add a column to the left for the individual steps.
Select "Insert Table" from the toolbar and click on the empty cell.
Set the cells to your step and operation fields and delete the extra column.
The result should look roughly like this:
By default the inner Tablix will be detail grouped. If your detail rows are more granular than the "Step" field, go to the properties of the "(Detail)" group and add a Group Expression for Step.
You can also delete the inner header row if you don't want to see it repeated in the report.
This results in the employee fields actually being merged and spacing properly. If you don't use an aggregate function on those fields, their value will be that of the first row returned internally. Which is moot if their values are uniform across steps.

Make a header/text line between field rows in an SSRS Tablix

I want a line between the package_notes and parent_line_pack_notes lines that is virtually just one big text box (i don't want the column lines) where I can type a boldfaced header or note that is the same every time, and still able to toggle visibility. How can I do that?
Create a text parameter for your note that you want to include - let's call it Note. In the first cell on this line enter the following expression:
=Parameters!Note.Value
On the Properties window set Font-FontWeight to Bold.
With the first cell highlighted, hold down Shift and click in the last cell on that row. Right-click and select Merge Cells.
When you run the report you will be able to type the note into the parameter and it will appear on that line in bold without column lines.

Move a column in Report Builder 2.0

How can I simply move a table column left or right in Report Builder using the UI (or text editor if necessary)?
I've tried to drag and drop, looked at menus, etc, and I can't find that option. Is it in there? So far I've had to delete and recreate a column every time I wanted to change its position.
In Report Builder 3.0 you can move columns like this:
Insert a new empty column
Copy (or cut) the text of the header and the text of the value in the new empty cells
Delete the old column
Or the easiest way is just to not move the columns but change their content by hovering over the column you want to change and select a new data type. After this you still need to update the column name and you're done.
I tried this too, but it only moves the values in the DataSet, not in the report:
Right click DataSet1 in the left menu and select Dataset Properties
Select Fields on the left and click on any field to move it with the blue arrows on top
You can cut and paste - click the column you want to move and cut with Control-X. Then select a different column and paste with Control-V. That will place the old column to the left of the selected column.