Select Rows in a Table in SSRS - reporting-services

Is there a way to select rows in table in SSRS? What I mean is, when a table is populated with rows of data, I would like to select the rows of a table and perform some action on them. Like in a grid view control, the user can select specific set of rows. Can we insert a checkbox control in SSRS table that can be used to select rows of a table and perform action on selected rows?

The functionality you are looking for is not available from SSRS out of the box. There are some hacks that you can use but they seem to be a lot more work than it's worth.
The basic idea is that a query in SSRS can include an Update or Insert command. Then you use parameters to track whether or not to run the update part and to capture your Primary Key or other field for your update. You would need to use the Action to act as the on-click event and it would only work for one row at a time.
http://www.sqlservercentral.com/Forums/Topic1472163-391-1.aspx
https://dba.stackexchange.com/questions/24009/

Related

Working with SSRS dynamic fields

SSRS matrix table is a great way to generate dynamic fields as long as values exist.
However, is there a way to "always" show these dynamic fields even if a value doesn't exist for them? The report field locations varies based on data availability and users have to add missing columns in Excel manually.
Dynamic fields go from 3 to up to 30 (at least for now based on run by values). Adding these values manually would make the report hard to maintain.
The way I have handled for this is in the SQL. I build a table of all the values I will always want, I cross join that table to my final output table and update/insert values where they need to exist. That way I guarantee the rows, and eventually columns in the matrix, exists even if they end up being null.
Does that make sense?
Jesse's solution is a good one, but if for whatever reason you can't or prefer not to change the SQL you can do it in SSRS by forcing a blank value in the cell with a expression like this:
=iif(IsNothing(Fields!.xxx.Value)," ",Fields!.xxx.Value)

limit sql results via table selections

I am curious if it is possible to limit the results of an sql select statement by joining another table with selectable options. ie. Have one table that a user can use to update their preferences such as display a,c,d and do not display b and e. (assuming the table would only have columns a-e) (this has is separate from the question). Once the user has updated / selected their options im curious if i can create an sql select statement that would fetch the results of another table based off of the options selected by the user in the first table. I know can can create a larger statement that would include all of the results and omit them if the value is not provided. im curious if there is a way to only select particular columns based off of another table
im curious if there is a way to only select particular columns based
off of another table
No. Queries cannot have varying columns. Technically, you can make a stored procedure do something like that; but it is considered a rather poor practice.
...and doing it the right way is likely not going to be a "larger statement".

use access form to edit data from a query result

I'm brand new to Access 2010, well to Access in general. I have a query that returns 10 columns (the query is called pending_review, the source is a table called escalations) in the results, some of those fields are blank since they have to be reviewed. One of the resulting columns is the primary key.
So this is my problem: I need a to create a form where I can type the primary key and the fields on the form will populate with the info from that row so I can fill the blank spaces with information that I now have and then update the table.Once the table is updated, that row should no longer show on the query results.
What I have done is that I created the form, but I don't know how to do the part of typing the primary key and everything gets populated. A solution would be to make a combo box that shows me the primary keys of the rows in the query results, so that every time i edit something in one of those fields for the query to be run again and reduce the number of options in the combo box.
Question is, how do i do that? or is there an easier and better way to do it?
Thanks in advance!!
Can you not just create a new form using the pending_review query as a data source? Access makes it very easy--you can just use the form wizard. This gives you a form in which you can edit one row at a time. Presumably the pending_review query has a filter condition that checks for certain fields being blank (null) or not. If you finish editing a result row in the form, and refresh the form, the row should then disappear from the form because it will no longer be returned by the pending_review source query.
Even if you need to do something more complex, this should at least be a good start.

SSRS - Why is my table duplicating rows?

I am creating a report in SSRS. I have a table showing the date and time the report was generated, it's a single column table with one expression =Now() and is not linked to any datasets.
The trouble I am having is that it returns 77 rows all with the exact same date. My main dataset returns 77 rows in a different table but that table is not linked to this one in any way.
How can I stop it from returning so many rows? The reason I'm using a table and not a text box is because I want it to have the same look and feel as other data presented in my report i.e. Header Row and Data Presented underneath. There are a few tables that use the same approach and all of them are returning duplicate rows. As you can see from the image below, I just need the first row from each table.
EDIT: Looks like SSRS automatically references a dataset when I insert a new table. When I change the table properties dataset to none it returns an error. Is there a way around this? I don't want data from any dataset, just want to use an simple expression =now()
As you've seen, a Tablix requires a DataSet, and when you only have one DataSet in a report it will link to this DataSet automatically in some circumstances.
You've mentioned you don't want to use Textboxes, but this does seem like the easiest option.
If you're set on using a Tablix for ease of formatting, to prevent any repeating rows just delete the Details group that gets set up by default when you create a Table through the designer:
This leaves a table with one header row only - you can add more header rows as required:
The result is a table that will only display the header rows once, i.e. no repeating rows.
You can add Summary data or individual fields from the DataSet to these header rows; if no aggregation is specified it will just take the first row by default.

Access: Select multiple records to print report

I am trying to design a form where I can select multiple records and on button click open the report with the selected records IDs.
I am thinking maybe make a continuous form with an added unbound check box control where the user selects the appropriate records they want to display in the report. I am unsure how to later read this into a do.cmd OpenReport criteria property.
If there is an easier way to this please let me know.
Take a look at http://support.microsoft.com/kb/135546 or http://allenbrowne.com/ser-50.html. Another approach you could take is create a temporary table that contains a single field for your record ID. Using the code from the links, fill the temporary table with the record IDs that have been selected. Then all you need to do is change the query that drives your report to do an inner join with the temporary table.
Can you add a column to your dataset where they can determine which rows to print? You could add a printMe Y/N column, for example, and then use that field value to limit the rows for the report.