SSRS only displaying first row - sql-server-2008

I have a very basic report in SSRS that displays a grid of data. The query correctly returns multiple rows but the report only displays the first row. The query is as simple as SELECT * FROM... I dont have any special formatting and the tablix is in the details part of the report, not header or footer by accident. What else can I check?

The tablix was missing a row group.

A similar issue is driving me nuts.
I created a report manually from scratch in VS2012, threw a tablix on it and added the columns returned by a simple select. The report preview returns only the first group by primary key.
Then I created a similar report using a wizard and that report, although having only cosmetic differences, returns all groups by primary key.

Related

SSRS Create As Many Tables As Needed (Using One Dataset) Based on a DataSet Field

I have a query that returns relevant data about inspectors and how long it takes them to respond to issues. The only parameters are a BeginDate and EndDate so for any given date range there could be anywhere from 0 to 100 inspectors.
I am using only one dataset and it contains an "Inspector" field that I'm hoping can be used as a filter to create as many tables as there are inspectors.
I know you can set filters on tables but from my (limited) SSRS knowledge, you must already have the tables created and the filters are typically hard-coded. What I need, is some way for the report to see how many Inspectors there are in the dataset and group those records into their own tables, repeating the same one created tablix over and over as needed.
This is being done strictly in SSRS 2012, not using a ReportViewer where back-end code could help me out unfortunately...
I don't have any code examples to provide, like I said I know you can do filtering but I am at a loss when it comes to doing something like this dynamically based on data... Sorry.
Depending on the report design you could either...
Single report with grouping
1. Create a single tablix.
2. Create a row group by Inspector and then add whatever fields you need to the details section.
3. You can optionally set page breaks between instances of your Inspector rowgroup from the rowgroup properties.
Sub report method
1. Create a subreport that accepts a parameter (InspectorID for example).
2. In the subreport filter the dataset using the parameter passed in so it only return data for a single inspector.
3. Add whatever controls you need to the report to handle a single Inspector
4. Create a main report
5. Add a dataset that gives you a simple distinct list of Inspectors, this will be used to pass parameters to the subreport.
Lets assume it just contains a list of InspectorIDs.
6. Add a list control to the report and set it's dataset property to the dataset that contains your list of InspectorIDs
7. Right-click in the list control's 'cell' and insert a subreport.
8. Set the subreport property to the subreport you created earlier and set that parmameter IsnpectorID to your InpsectorID field.
This will produce a subreport for each instance of inspector it finds.
Sorry about the format of this answer, in a rush!

Bulk Printing in SSRS

I have a report using cascading parameters and sub-reports in SSRS.
I am able to print the report correctly for single student but when I select multiple ids I see that the data gets mixed up in the sub-reports.
I made sure I am using row grouping for studentID in all my sub-reports.
Any idea if I am missing anything?

SSRS Tablix strange behavior with lookup expression

I'm seeing some odd behavior with an SSRS report I'm working on. I have a 2 tablix elements that are are populated with the same dataset from a stored procedure. I have applied a filter on each tablix based on an Active field (Active and Inactive) in the dataset. Data looks fine and until I add an expression to the last textbox column field to do a simple calculation (see below). The values based on the data expression come back correct but the tablix now shows a duplicate row for one record (last record) in the tablix that has the filter set to Active. I'm not quite sure what is going on because the data is the same hasn't changed from when the expression is not there.
=Fields!Avg.Value/Lookup("Low Risk", Fields!RiskGroup.Value, Fields!Avg.Value, "ReportData")
Update:
So I haven't solve the problem but have more information. What looks to be happening is due to the order of the records coming back in SQL and how the tablix is filtering. The "Low Risk" record used in the lookup is the last record in the grouping. My 2 tablix I mentioned previous are identical with the exception of tablix filtering on Active field. If the Low Risk is the last record in the data set there are no data issues. However if the Low Risk is not the last record that is when the tablix goes awry. Anyway, still researching but anyone has any information it would be greatly appreciated.
Update:
Still haven't found the issue but found a workaround. I've extracted the lookup expression to a textbox and then reference that textbox in my tablix expressions and seems to do the trick....Still very odd behavior. I actually mocked up a simpler dataset and didn't see the same behavior so must be due to something in my dataset that I can't pinpoint.

SSRS 2008 R2 Subreport Will Not Display

I've looked through all the other topics on this subject but I cannot find an answer. I have a report that utilizes a dataset that runs a stored procedure. That SP returns two rows, both of which I can display in a table in the report. So far so good.
Next, I added a tablix which uses the same dataset. In the (only cell in the) detail row of the tablix I added a subreport. I added the parameters to the subreport (four of which come from the dataset and one of which comes from a main report parameter). I created a row group tied to an Id column on the dataset.
What I expect to see when I run the main report: two instances of the subreport, one for each of the two rows returned by the SP.
What I actually see: In ReportBuilder I only get the first instance of the subreport. If I call the report service from an application (rendering it as a .PDF) nothing of the subreport shows at all. In either environment, there are no errors showing in the report.
What I've checked: I made sure all the various visibility options in the tablix, the row group, the subreport, etc. were set to always show. I also added some text to the subreport's NoRowsMessageproperty. That text is shown (one for each row) for the subreport when I try to run it from the Report Service. Why this would happen I also don't know, as the parameter values I supply are identical in both cases.
My guess is that I've got something wrong in the way I'm doing the row group, but I don't know what it is.
In the end I just created a new (blank) report and recreated the tablix. Even though I used the same data source/row group/parameters, etc. it worked just fine. I have no idea why. I copied the working tablix in to the broken report and it still didn't render correctly. Again, I have no idea why. However, I got it working by just starting over. Thanks for all the answers.
Try putting the subreport in a rectangle, I did a report that way in which the subreport pagebreaked after each instance.
I would make sure the rectangle with the subreport in it is under the group row in your tablix.
Cheers!

Make Tablix Column group show when filter returns no rows - SSRS

I am working on some SSRS reports and am running into an issue where Tablix Column groups drop from the table when the filter returns no rows.
Is there any way to make this column appear but with empty cells? I have another tablix grouping adjacent with the same columns and I want the columns to all line up on the multiple tablix.
Am I just missing a simple option?
Maybe add a
UNION SELECT '', n ..., '';
clause to your report query? It's ugly but should work. If you go this route, add a comment for your colleagues (or your future self) that will have to maintain the report.
I have not been able to make these columns appear on the SSRS report end. Specifically I am getting data by month for display. My solution is make a "Result" table on the SQL side with $0 for every combination, then update this table.
Frustrating, but it works.