SSRS - One tablix with 2 Datasets - reporting-services

I am trying to build a report to show projects and subprojects status updates with data for projects and subprojects coming from 2 separate sharepoint lists i.e. datasets in the same data source.
The problem is
That I do not know how to build a lookup function for tablix to pull data from different sharepoint lists.
Tablix needs to have a rule for exceptions: 3 projects have subprojects but the other do not have subprojects.
The expected result is for tablix to display status report in the following way:
status update next steps
project1
project2
project3
subproject 3.1
subproject 3.2
subproject 3.3
I have linked the projects to subprojects using a key.
Advice much appreciated.

In current release of Reporting Services, each tablix can contains only one dataset. So in your scenario, the easiest way to achieve your requirement is combining the two datasets into one using Join in the query if it is possible. If the datasets cannot be combined, there are two ways you can give a try
a. Subreport - create a subreport to display in another report
1.Create another report as the subreport and insert the child row data.
2.Create a parameter named ID in the subreport.
3.In the main report, right-click to insert a subreport in the child row.
4.Right-click the subpeort to open the Subreport Properties, and select the
subreport name in the drop-down list.
5.In the left panel of the Subreport Properties dialog box, click Parameters.
6.Select Name in the drop-down list of ID, and select [ID] in the drop-down list
of Value.
b. Use 'lookupset' function (more on lookupset function Lookupset Function

Related

How to populate an rdl table based on data returned from a query?

I have absolutely no experience working with rdl files and I received a ticket from a client asking us to display multiple reports in one report. What I have done so far is created a master rdl file that contains a sub-report. That subreport is linked to another rdl file which is the actual report that is normally generated. What I want to do is generate a list of those subreports based on the data received in an array from a query. So if there are 6 elements in the array then I need to have 6 subreports generated, with each report using data from the appropriate index in the array.
I managed to figure out how to connect the data for one subreport but I have no idea how to scale that programatically.
The basic steps are
Create a subreport that accepts parameters (done I guess)
Create a master report (done)
Create a dataset in your master report that contains a row of data for each subreport. For example. If you subreport showed employee details for a single employee, your main report might contain a dataset that lists employee IDs for a department.
Add a tablix to your main report, remove header row and leave only a single column. Stretch this column to fit your report width
Set the datasetname property of the tablix to the name of your dataset, (now it will produce one row per employee)
Right click the tablix cell and insert subreport
Right click the subreport placeholder -> properties then choose your subreport form the drop down.
Set the subreport parameter(s) to be the values from your dataset (e.g. EmployeeID = empID)
That's it.
You main report will run, the tablix will create a row per record in your dataset, this in turn will give you a subreport per row in your dataset, each of those subreports will have the value of the field from that row passed to it.
If you need more help, I'll try to track down a similar answer I posted a while back which had more detail.

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.

Create report base one number of records dynamically in SSRS

Let's say I have the following data:
In my SSRS report I have a parameter that prompts for MainID.
Now If I put MainID as 1, I should get one report. If I put MainID as 6, I should get 3 reports. Is there a way I can generate these reports dynamically using SSRS? Thanks.
I would approach this by creating a report that uses a List control, and has a page break between each item that you use to group by within that List. One report, a different page for each item of interest, SubID in this case.
Create a new report with an empty body.
Add the Data Source(s), Parameter(s), and Dataset(s) that are needed.
Add a List object to the body. Drag and drop it into the body from the Toolbox.
Set the Dataset for the list to the one you are using to return the data you have listed in your question.
In the Row Groups pane of the Visual Studio report designer, right click on the Details row, and choose Group Properties. On the General page, click the Add button under Group expressions, choose SubID from the Group on dropdown.
While in the same dialog, go to the Page Breaks page and check the Between each instance of a group option. Click OK.
Add a Tablix inside the List. This is what will show your data.
Add some fields to the Tablix. Add Detail and Notes, for no good reason on my part.
Run the report. If you have setup the data source and data set to properly run and filter base on your parameters, you should see something. Maybe an empty report.
Now (based on the data you provided), if you choose 1 for your MainID parameter, the report will display one page, but if you choose 6, you will get 3 page3, or however many records there are related to the parameter value for MainID in the database.
One report, multiple pages depending on the parameter/data. It's not a 3 different reports solutions, but something that could work for your situation.

SSRS - multiple toggle in single row item to drill down sub report

I need to open a sub report using drill down concept. Is there any possible to give toggle for multiple columns in single row.
http://i.stack.imgur.com/WplSn.jpg
The sub report have two parameters to show data. If I click first link the subreport to be drill down with parameters 1 and 5. If I click second link the same sub report to be drill through with different parametrs as 2 and 6.
Any idea to do this?
If you are using BIDS 2008, use embedded datasource and dataset as there is a know issue when using shared dataset.
Create a Sub Report
In Sub Report, create a parameter, Dataset for your data. Add a table object to your report
You should be able to find lots of examples on how to create your parameter in sub report
Your dataset should use the SubParam1 and SubParam2 in the query for the dataset.
Create your Main Report
Add additional detail line below your data and add your subreports into the column.
To set your drill down and pass parameter to your sub report, set your sub report property accordingly ..
Result .. 1. Three columns, the second and third column not drilled down. 2. Three columns with second column drilled down and third column not drilled down. Separate drill down for column 2 and 3.

One page SSRS report for each distinct value of table

I need to create an SSRS report which will display various objects (charts, tablix ...).
This report must display data refering to a distinct value of a table.
This is like a group but for all objects of my report.
Do you know how to do that ? I thinked about creating a list or a table and insert objects in it but a list or tablix could only have one dataset and I have many.
Could you suggest solution ?
Thanks
Put list in main report with one dataset and use 4 sub reports for other datasets...