SSRS Matrix hide last column - matrix

I want to hide the last column for matrix in SSRS.
The column is in number format.
I have try the column visibility with expression like
IIF(Fields!abc.Value = Last(Fields!abc.Value), true, false)
but it didnt work. It still show all columns.
Is it my last function use incorrectly?
Any other way to do this ?

Related

Google Sheets: display all values existing in column A when a specific string exist elsewhere on that row

I want to display all values existing in column A when a specific string exist elsewhere on that row.
The formula in B10 should display "Table, Bed" in any form.
=ARRAYFORMULA(JOIN(",",IF(C3:E5=A10,A3:A5,)))
Comparison = within a array formula produces the desired array. Join them with ,

How to split a Webix datatable column into multiple columns?

In my webix datatable, I am showing multiple values in the cells for some columns.
To identify which values belong to which header, I have separated the column headers by a '|' (pipe) and similarly the values under them as well.
Now, in place of delimiting the columns by '|' , I need to split the columns into some editable columns with the same name.
Please refer to this snippet : https://webix.com/snippet/8ce1148e
In this above snippet, for example the Scores column will be split into two more editable columns as Rank and Vote. Similarly for Place column into Type and Name.
How the values of the first array elements is shown under each of them will remain as is.
How can this be done ?
Thanks
While creating the column configuration for webix, you can provide array to the header field for the first column along with the colspan like below:
var columns = [];
columns[0] =
{"id":"From", "header":[{"text":"Date","colspan":2},{"text":"From"}]};
columns[1] =
{"id":"To","header":[null, {"text":"To"}]};
column[0] will create Date and From and column[1] will be creating the To.

How can I hide an rdlc report Tablix based on the contents of cells in a column, in Sql Server Report Services?

I have the following table in a report:
I need to hide the table (or even better, add some message that this has happened) for when all of the value cells pictured have no value. So in the picture example, the table would not be hidden, but if the 5 values were missing, it would be.
The problem is there's no real way to reference cells, or even columns in SSRS as far as I can tell via Google. Have I missed something?
My solution to this type of thing is to check the row count of the underlying data set for the tablix. If it is not zero, then show the tablix. This is what the expression would look something like in the Hidden property for the tablix.
=IIf(CountRows("DataSet1") <> 0, False, True)
Add a label that says something like "No data to report" to the report that only shows when the dataset is empty. Expression here:
=IIf(CountRows("DataSet1") = 0, False, True)
This assumes that no records will be returned in the dataset when there are no values for all selected columns. This also assumes that the name of your dataset is DataSet1.
EDIT:
Another possible approach is to check all of the dataset values that fill the cells, if they are all empty, then hide the tablix. Something like this could be used for the Hidden property:
=IIf(Fields!field_name1.Value <> "" OR Fields!field_name2.Value <> "" (etc.), False, True)
One other approach is to check for values in the SQL for the dataset. If all of the values are empty return an extra column, maybe named hidden, that is false. True if values are present. Not the prettiest approach, and it may mean a significant change to your SQL, but it could work.
With this last one, instead of returning true or false, you could return a 1 or 0. Then, in the RDL for the Hidden property, sum that column and if it is = 0, hide the tablix.
=IIf(Sum(Fields!hidden.Value, "DataSet1") <> 0, False, True)

Using XPath to find rows where a specific column has value

I'm having trouble using XPath to find a row in a table where a specific column contains a value. The table has 10 columns where 2 of them will show Yes|No but I'm only interested in finding the value in one of the columns (the 4th one). My initial attempt was this:
//table[#id='myTable']/tbody/tr/td[text() = 'Yes']
but it finds it rows from both columns. I thought I could try something like this but it's not a valid expression:
//table[#id='myTable']/tbody/tr/td[4]/text()='Yes'
Any suggestions? Thanks.
You can try this way :
//table[#id='myTable']/tbody/tr[td[4][. = 'Yes']]
The XPath return row (tr) having the forth td child value equals "Yes".

DataTable.RowFilter using List results?

I need to keep the original DataTable and filter it based on list values. I've tried to hide rows that don't match up to the list but it doesn't work instantly. I don't want to copy the list to another dataTable and bind my dataGridView to is cause i have too much tied up to the original DataTable. Filtering only works for a few conditions but the list is holds only the values that are needed. Is there a LINQ solution to this? C# only please. This is how I got my list. There is another dataGridView that holds primary key for the datatable that I need to filter. It's key is held in a comboBox.
DataTable MainTable = MainDataSet.Tables["MyTable"];
DataTable lookupTable = lookupDataSet.Tables["MyLookupTable"];
var List = (from x in lookupTable.AsEnumerable()
where x.Field<string>("kAutoInc") == comboBox.SelectedValue.ToString()
select x.Field<int>("Pct")).ToList();
var a = MainTable.AsEnumerable().Where(r =>
List .Any(id => id == r.Field<int>("Pct")));
This gives me values of int 30, 40, 50, 60...
The DataGridView has a matching column "Pct" that I need to filter rows that only contain these values. I know it seems easy but I just can't seem to get it to work.
Please use DataView instead.
dataview dv=new dataview(datatable);
dv.filter=string.format("column1={0}","value1");
Like that.

Resources