SSRS Conditionally remove rows from a table - visual-studio-2010

I am new to SSRS and need to get this working for my project(work not school)
I have implemented the data to be hidden on expression
=IIF(Fields!Offset1.Value = "",true,false)
Problem is that It leaves the empty space where those values would have been in my Report. I need the space to disappear too. Any help would be GREATLY appreciated!!
EDIT: Forgot to mention that I am getting my data from a MS Access DB (if that matters)

After much head scratching and thinking about it differently. #django made me think visibility not hidden properties. I righ clicked the row header tab and clicked on the Row Visability... option. That brings up the Change display options dialog box. I selected the Show or hide based on an expression andthen the fx button to build the expression. The expression i used was
=IIF(ISNOTHING(Fields!Offset1.value),true,false)
clicked OK
Ran Preview and this is what i got as a result:

It sounds more like you need a 'visibility' on a grouping more than a hidden expression and you can use ISNOTHING() instead of = "". I believe (not sure don't quote me ;) ) that SSRS evaluates hidden to only hide values not the object container itself(the row). You may be better with your group or 'details' group to have an evaluative expression on the 'visibility' rather than an element you used instead. Let's give a very simple example to drive home the concept:
Create a simple dataset in a new report. DataSource does not matter as this is only a table variable that is self contained.
declare #Temp table ( Code char(1), Value int)
insert into #Temp values ('A', 1), ('B', 2), ('A',null);
select * from #Temp
Create a table from the toolbox and populate both columns with the data from your set.
Copy and paste this table right below itself in the report.
Now for the second report click anywhere inside it but in the lower left you should see 'Row Groups' in the 'Design' view of Business Intelligence Development Studio (or the web creator if you are using that). Right Click '=(Details1)' (or similar) and choose 'Group Properties.
Now select 'Visibilty' on the left pane. This relate to the entire grouping, not just a cell in an element. Hit the 'Fx' under 'Show or hide based on an expression'.
Enter in the expression:
=IIF( ISNOTHING(Fields!Value.Value) , true, false)
Preview the report. You should see the first table with three rows and the second table IGNORES the third row because it qualifies as nothing which it evaluates for the ENTIRE GROUPING to mean 'do not show'.

Related

Oracle Apex - Select List on Interactive Grid

I have an Interactive Grid with a really simple select list (two values only):
No
Submitted
This is an editable IG, when I click on my select list column the value automatically changes to 'No' (which is the one displayed first out of the two options) regardless of what I have on that row.
E.g.
This is row 1:
It had 'Submitted' as its value, but when I double clicked to edit, it automatically changed to 'No'.
Does anybody know how to fix this?
Thanks
(using Apex 22.1.3)

Spotfire DropDown list to filter entire page?

I have been desperately trying to figure out how to take a column, customer name, and be able make a drop down list that filters the entire pages visualizations so that when you have a specif customer selected it filters everything.
I think I'm going down the right path my creating a property type string and setting it to unique values in that customer name column, but cant seem to figure out what to do next. Even if i have to set it individually for each visualization that would be fine, but i cant seem to get this to work.
Can someone help me figure this out?
I'm on spotfire 7.0 if that matters. Thanks
Thank you in advance.
#TPLEE - In order to apply filter to the visualization from the selected drop down, you have to insert the below case statement in 'Limit data using expression' section of the visualization properties as shown below.
Right click on the visualization and go to properties.
Click on edit as shown in the picture and insert the below case
statement and click 'Ok'.
Note: 'YourCOLUMNName' will be your column name from the data table that you are using and ${CustomerName} is your property control name
case
when "${CustomerName}"=[YourCOLUMNName] then true
when "${CustomerName}"="" then true
else false end

Is there a quick way to set a visiblity expression for many rows in a SQL Server Report Services RDLC report?

I have a report with many tables (tablixes?), in which I need to hide all rows that don't have a value in the 2nd column:
I can do this by right clicking on each row
and setting an expression for the visibility of the row that depends on a value appearing in the field of the 2nd column, e.g.
=IIF((Fields!MyField4.Value = ""), True, False)
But the problem is that my report has over 1000 of these rows! It will take a very long time given that each field has a specific name! I can modify the Xml, but this will also take a while. I am currently writing some code, which uses XDocument, to achieve this.
Are there any faster ways that anyone can think of? Maybe something from the designer, or some VB code? Everywhere on the internet seems to suggest right clicking one row at a time.
In the Designer, select all of the rows (using your Shift or Ctrl key), and use the Properties pane in VS/BIDS to change them all at once. There is a Hidden property there, and you can choose Expression from the dropdown in it. From there, you can apply the IIF to all rows.
Of course, I am assuming all of the visibility is based on the exact same expression for each row. If not, then the answer is no. Unless, you want to start doing some copy/paste stuff in the RDL XML, which I do not recommend.

Using XPath to locate on a button within a table

I have a table with several columns. The first column contains unique data, the 5th contains three buttons (Edit, Assignments and Delete).
I would like to use an XPath expression to locate on the edit button for one of the rows by indentifying the row using the unique data from column one (think that made sense).
I have built some expressions which will allow me to locate on the first column and edit button independantly as follows:
//td[text()='Managers']
and
tr[2]//button[text()='Edit']
The closest I can get to doing what I want is:
//td[text()='Managers'] | //tr[2]//button[text()='Edit']
...However this will locate on the data/button in column 1 AND 5 at the same time, what I want is just for the button in column 5.
The reason I want to do it this way, is so later I can pass in 'Managers' as a varaible in order to select the row (as its unique and meaningful data), and then press the edit button in a different column on that row.
Hope this makes sense!
Thanks
The question isn't very clear as posted, especially because I can't see any relevant part of the HTML. But if I understand this correctly, you can try to select the row that has Manager in it then get corresponding Edit button like so :
//tr[.//td='Managers']//button[.='Edit']

How to populate dynamically generated select boxes with ajax

I haven't been able to find a solution for the particular problem I'm having with this project. I need to the following: dynamically add rows to a table that contain two select boxes AND use ajax to auto-populate the select options of the 2nd select box, based on the value of the first select box... in the respective table row (that was dynamically added on the fly by some js).
Still with me?
I can easily populate, dynamically, a select drop-down using ajax/javascript based on the value of the first drop-down, in the first row. I can even populate three or more select boxes in the same row, using ajax/js functions to load each additional select. Yet, this is not my goal.
Here's what I have... My form contains a simple table with 3 columns. First is a checkbox, the second is the "State" select box and the third column is the "City" select box. I have two buttons above the table that allow me to "Add Row" and "Delete Row". Mind you, the first row (which is programmed-in), works perfectly for loading the city names of a state using ajax.
Upon clicking the Add Row button, I'm able to create the second row dynamically, which contains the checkbox, state select and city select fields. The state select is populated based on the innerHTML content of the original column, but the city select is obviously null because it is expecting ajax to fill it. Note: the names and ID names of these fields are iterative... city_id, city_id_1, city_id_2, city_id_3 and so on... so I have that uniqueness to work with.
My problem lies in the fact that when I select a state from the 2nd or 3rd (and so on) rows, only the firstcity select changes. Why? Because the js/ajax processing function says to operate only on the element with name "city_id"!! Which is the name of the city select box in the first row.
I have not (yet) found a way to dynamically pass the name of the element I need updated to the onreadystate ajax function. When I've needed to populate two or three select boxes in a row (same row), I've had to have complementary ajax functions for each drop-down - which are static, mind you... but what if I create the element dynamically?? I can't pre-program that many functions into my page... or must I?
If you have any ideas on how to accomplish this I would be soo damn appreciative!!!
Thanks!
var i=1; // put here the number of the column being added now.
var x=document.getElementById("city_id_"+i);
// populate x

Resources