SSRS 2008 R2 Subreport Will Not Display - reporting-services

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!

Related

SSRS - Two different reports in one Excel?

I am pretty new to SSRS, so forgive me if I am asking something that is either obviously not possible (or easy) - I haven't found what I am looking for so far!!
I have a Detailed report, which splits by group onto multiple Excel tabs (pages). I also have a separate Summary report which outputs onto one page.
I want to merge these two into one report, so the users receive just one email, with tab 1 showing the Summary report and tab 2 on wards showing all the Detail.
The datasets come from two stored procedures and whilst related, they are different so I can't use the same dataset.
Is this possible in SSRS?
Thanks
Mark
Take your Detailed report and insert a subreport at the start of it. Set the subreport properties to point your Summary report.
If you have any manually set parameters in the Summary report, you'll need to set them up in the Detailed report (if they don't already exist) so you can pass the parameters to the subreport.
Now you have a single report with everything in.

SSRS - SubReport

I have a subreport I am trying to link into my main report. The main report pulls back information from one database and the subreport pulls from another. I could use lookup, but I lose the ability to format so I was hoping to achieve this with a subreport.
I enter a date range via my parameters, and let's say I get 30 client/matter codes back. It page breaks at the end of each row, so the data for each client/matter ends up on its own report. The goal is for me to output a large number of reports based on date ranges. The subreport pulls in folder names, and just like the other information, the folders for only that client/matter should be on that report.
What's currently happening is on each report, it just lists ALL of the folders for ALL of the client matters on each and every report.
I've tried making the subreport an adjacent group (which you can see in the screenshot) and grouping on Client code and then matter code. I've tried making the client code and matter codes internal parameters in both reports in the hope that it help filtered. I also tried just inserting the subreport into a cell inside the matter_code group but not as a group itself.
I apologize in advance if my explanation doesn't make sense. I'm having a hard time trying to put this into words.
From your explanation I would assume that you have a subreport in a group but you are not passing anything through to it. Have you tried passing through parameters to the subreport that uniquely define the customer and the customer folders?

SSRS Report - using the value from the subreport in a calculation in my main report

I am writing an SSRS report using report builder and have my main report and a sub report - I have had to do this because one of the figures is in a different table. The main report shows a customer column an amount column then my subreport column - in the next column I need to show these two figures added together, there is then a further column with another figure in and the final column will deduct the fourth from the calculated third - I dont know how to write an expression which incorporates the subreport value.
You can't retrieve values from a subreport like you wish as that's not how subreports work.
When you run the SSRS report, the parent report passes parameters to the sub-report (the only data transfer between the two), the subreport is rendered and then the rendered subreport is inserted back into the parent report as the parent report is rendered.
As I see it, you have two options to tackle the problem.
1) Join the data from the two tables in your source query so that all the appropriate information is within one dataset in your report.
2) Use the Lookup function to retrieve values from the second dataset. This is a very flexible option and one that I highly recommend that you review for scenarios like this.

use expression to dynamically decide which subreport to open

I have a report that contains several pages with graphs, tables and so on.
This report is used by different customers who always want small modifications to the report. At the moment if a customer wants a change on page 5 the whole report is recreated with the modifications, even though the only change is in the graph on page 5.
More so, some customers don't want to see page 3, others want a custom table at page 6.
My boss would like the report to be modular so he can simply switch parts on/off depending on what the customer wants. At the moment a change in a report means development followed by deployment.
My idea is to create a report with a number of subreports. Each graph/table would be a subreport so that if a change is needed we only need to change thàt specific subreport.
Ideally a dataset would be attached to the mainreport detailing which subreport to show: for customer X we would show SubreportX, Customer Y would see subreportY.
I know this can be done by adding all possible subreports to the mainreport and switching visibility per subreport but more elegant would be to dynamically decide which subreport to show. On drillthrough reports this is possible by using an expression to determine which report to open;
eg IIF(customer = X, "subreportX", "SubreportY")
but is this possible with subreports?
To be clear: I am looking for a way to decide dynamically at the moment of opening the report which subreports to show. Something like using an expression to get the name of the wanted subreport.
I have been searching for this (in VS2012 and through Google) but I cannot seem to find a definitive answer whether it is possible to decide at opening the report which subreports to show....
I found the following but again that seems merely to be using toggling visibility:
Dynamic subreport in SSRS 2008
I am very much hoping for suggestions, answers or even general directions. Thanks for thinking with me!
I would create a Dataset that returns the list of valid subreports for the selected Customer. I would add all the possible subreports to the master report. I would set the Visibility property of each sub-report using a Lookup expression, targeting that dataset.

ssrs shows errors after subreport in maIn report

I have a simple main report and a subreport. The subreport uses two parameters which I set up by selecting the values from the drop downs on the parameters screen. The main report contains one set of patient information in several tables in a list. The subreport contains additional details that run off a different data set.
When I run the main report, the subreport runs correctly except that after the last record, there is a repeating error message: "One or more parameters were not specified for the subreport, [Subreport Name] Sub Report. This number of times this message repeats before the next record in the main report varies from patient to patient.
I have validated what's being returned in the subreport when the main report is run by running the sub report separately. The sub report correctly shows all of the data for each patient. Nothing is missing.
I checked that none of the parameters had a list of available values or default values.
I experimented with hardcoding the values passed to the subreport and this resulted in no error messages displaying.
Scratching my head over this one.
Figured it out. I was using a table object and putting the subreport in the detail row. I tried using the same grouping as the list but it still returned multiple records.
I deleted the table and replaced it with a matrix. This resolved the problem
You are not returning exact number of parameters from your main report to your subreport. Like you have defined more parameters in subreport properties and they are not returning from main report