Make hidden table column take no space in SSRS 2008 R2 - sql-server

Has anyone figured out a good way to make a hidden table/matrix column take no horizontal space?
I could use some crazy conditionals to dynamically determine the contents of the columns (effectively sliding them leftward as far as possible), but that is nasty, plus doesn't allow for varying column widths in the columns to the right of the one I want to hide.
The idea is that when a parameter is set to "Any" then the column with the corresponding value should display. But when the parameter is set to an explicit single value the report doesn't need to contain that column any more (it will be separately listed as a condition at the top of the report).
This lets me use the same report in different situations, some requiring hiding unnecessary columns.
P.S. I think Microsoft should add expressions for object sizes, and I think they should add CanShrinkHorizontally to the CanShrink(Vertically) that already exists...

I think you are looking at the Hidden property of the column. Something that is hidden will still take up space. What you want to change is the Visibility of the column. Right click on the column header and click Column Visibility and set it there.

It looks like you can hide groups, and groups can be rows or columns.
Click the down-arrow next to "Column Groups" at the bottom of the Design pane, and turn on Advanced Mode. Modify the Hidden property of the Static group representing the desired column. Poof! You've made the entire column take up no space.

I struggled with this and came up with a workaround/solution.
In my scenario it was critical to have the RowGroups EffectiveDate, Description AND TransactionID. I wanted to hide the TransactionID column, because it was part of the grouping I couldn't set the Columns Visibility.
Before
After
So what I did was Merge Cells for the Description/TransactionID Header (and called it Transaction Type) and also for the first row of the tablix "Opening Balance".
Set the TransactionID textbox Hidden: True
The trick was to make the [DESCRIPTION] Right BorderStyle: None
Then set the Cell under [TRANSACTIONID] Top BorderStyle: Solid and Top BorderWidth 0.5
Alternatively make the fore color of the column you want to hide white and set border styles appropriately.

Related

Is there anyway to set selection column as the second column after expand icon in Ant Design?

I am learning Ant Design, and I wonder how to design the table with expand icon as the first column and checkbox column as the second one, like this this
I see regular Table element has a default first column with a checkbox. I don't want to use the state variable as in the code example provided here.
I don't know how to set the columns as I want.
Thanks for all support.

Need to add Condition to Column Visibility but it is greyed out

Need a workaround for this. I need to be able to set a conditional expression for this column but it is greyed out. I understand that the reason for this is because I have a row group involved but removing the row group will not provide me with the desired result. I have also tried to use the hidden visibilty in the properties pane, but it just removes the column which creates a white gap in the table.
Any other workarounds out there for this?
One of the ways we have dealt with column visibility and groupings is to create multiple subreports and set them overlapping on each other. You then toggle the visiblity based on your needs.
If you add a column group you can then set the visibility on the group, rather than the column. This will make this a tablix rather than a tale

hide ssrs textbox based on table data

I can hide a table with no data by using this function in the visibility expression - =Iif(CountRows() > 0, false, true)
But I have a textbox used as a heading for the table.
How do I hide the textbox if the table relating to it has no data?
Thanks
=iif(countRows("DataSet2") > 0, false, true)
Where DataSet2 is the name of your dataset. This is because you are now informing the expression to Count the Rows in DataSet2. As no rows exist, it is set to hidden.
Further information...
Is the heading for the table adjacent to the table? Are you aware you can add rows above a table to provide extra heading information?
For example you can Right Click the Row Header, Select Insert Row -> Above and a new Row appears. You can then merge the cells horizontally, and set a title for the table (for example)
Now when you set the table to be hidden, this header row is also hidden automatically.
I'm not sure this is applicable to your situation, but I thought it might be useful to add, to reduce the complexity of your report, if you were unaware of the possibility

OBIEE Characteristic Table with dynamic header

I have original data as shown above with a single record. I have name of the field in one column and value in another column. I need to transform make the heading dynamic as shown below.
I tried with table pivot table and trellis, not no success.
You should be able to do this in a pivot table in OBIEE.
Please see my below screenshot. I was able to get my column originally named 'Total Contracted Cases' to now be called 'USD' because that is the value in the column 'Currency Code'. So for you, you should be able to get the column 'PARAM_VAL1' to be called 'COUNTRY' because that is the value in the column 'PARAM_CD1'. See below for my example:
In the second image, be sure to click on the 'Measure Lables' properties to hide the value.
For columns that are not metrics (no aggregation rule set) that will be used in the 'Measures' section of the pivot table, you will have to define an aggregation rule in the column properties dialog box to keep the value from being converted to null. If your data is as you say it is (a single record), then this should not be an issue; you should be able to pick any aggregation rule and not have to worry about dropping data.

Values not showing in Access form combo box

I have an application in Access 2003 that I am working on. In it, I have an employee table, which is connected to two other tables. The two connected tables are tables that hold a few fixed KeyWords. In my main employee table, I just have the ID from the other table, rather than having the whole word.
I wanted to make a form for entering data into these tables, so I made a query from the three tables that shows the all the regular fields of the employee table except instead of those two ID's, I showed the words themselves.
I then made the form and set the query as the RecordSource. The fields that have keywords are Combo boxes on my form, and their ControlSource is the keyword field from the query (like I mentioned earlier, the value can only be one keyword out of a list). Now, the problem I face is this: When I want to see a single record, it shows the correct value in the ComboBox, but when dropdown the menu, it doesnt show any of the other values.
What is the best way to do this? Am I doing this in the wrong way?
Thank you
I'd approach this slightly differently, set the combo box Row Sources to include both the id and text fields (you can hide the ID column if required by setting it's width to zero). Now add the ID fields to the employee query; you shouldn't need to join the other tables to the Employee table in this query, these fields are foreign keys and the combo boxes should show the text for you automatically. Set the form Record Source to this query, now set the combo box Control Source to the appropriate ID value from the form Record Source.
If you let the wizard build a form for you based on the Employee table you will see this approach in action.
ControlSource is the column name of the table where any user entry will be saved.
RowSource is where you type the name of the saved query or manual query typed directly into that field, which is used to provide a list of available drop down options for the combo box.
RowSourceType should be set to Table/Query, which is based on aforementioned RowSource method.
Now to correct the problem of only displaying what you begin to type (i.e. "Allow AutoCorrect" in Property Sheet > Other) or already have saved for that record without other options appearing after clicking the drop down is the following:
In Design View, click the combobox in question.
Property Sheet > Format > Column Count = set the desired number of columns to display in drop down.
Property Sheet > Format > Column Widths = set the desired width of column in the drop down.
Property Sheet > Format > List Width = set the desired width of the drop down itself.
Property Sheet > Data > Bound Column = set to the column of query table (i.e. 1 for ID and 2 for list options, if you only have two entries)
Note: If your desired drop down options are column two and not column one (makes things easier btw) then do the following change from above:
Property Sheet > Format > Column Count = set the desired number of columns to two.
Property Sheet > Format > Column Widths = add two entries 0",1" which means the ID field is not visible (0") and the options field is one-inch.
The easiest way to sort this out in the beginning is to view the column header names to know what you are looking at in the meantime by doing the following:
Property Sheet > Format > Column Heads = set to yes. At least you will know what is showing and whether or not you are on the right track.
I had this same issue in access 2016 and the issue was with my datatype. The combo box didnt accept 'Longtext' so i just changed datatype to 'shorttext' instead and all the values appeared.
You have set the query as the recordsource for the form. A form only shows (and ties to) ONE record at a time.
Since you want the combo box to show all the values, you should set the RecordSource of the ComboBox to your query.

Resources