SSRS Create Tabs Dynamically - reporting-services

I've created many SSRS reports with multiple tabs, and am able to name the tabs at will using the page break/page name section of the properties window for a given tablix.
What I'm trying to solve for now, and can't find any good answers on the web for, is to create new tabs based on the result of my dataset.
The simplest example of which would be a new tab for each year of data, so now that we are in 2017 I would expect the report to add in a new tab for 2017 data (this is just a hypothetical example).
Is this possible in SSRS-2014, or do I have to settle for manual updates/additions every time I want a new tab?

You can do this. What you need to do is put the controls in the body of your report into a List control. In the Details group properties of that List control, group by year and set it up to page break between each group.
The basic steps are in the answer here below.
Create a new report with an empty body.
Add the Data Source(s), Parameter(s), and Dataset(s) that are needed. Make sure to include Year in your main dataset.
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 main data that has the year in it.
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 Year from the Group on dropdown. This assumes you are getting this in the data.
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.
Run the report.
If your data returned information across more than one year, upon export to Excel, you will have one sheet for each year.
To set the sheet labels, you set the PageName property on the List detail properties pane.
Click the List control
In the Row Groups pane of the Visual Studio report designer, click on the Details row
Find the Page Name property in the Properties Pane, and set the expression to the Year value from the dataset =Fields!Year.Value
Now the sheets should be labeled with the year.

Per alejandro zuleta's comment, Set the desired group properties to page break between each instance of the group, when the report renders to excel it should interpret this as a sheet break.
If your group is dynamic, so too will the number of sheets.
You may also consider having a nested table (one table inside the other) where the "parent" table has no header and a single group (and cell) that controls your pagination. for instance; in your hypothetical, you could set the grouping to be something like =YEAR(fields!date.Value). then the "child" table contains the headers and groups that make up the report.

Related

In SSRS is there a way to use newspaper columns and still have a new page per group?

My dataset is grouped by customer then itemtype and then the details are the itemcodes and descriptions.
I am using the Newspaper column setting so that the list of items continues on to the right side of the page instead of moving on to the next page.
My problem is that I want to start a brand new page for each customer. Since SSRS treats each column as a page break, I get a page where one column belongs to one customer and the next column belongs to another.
I have tried the page break setting on the different group and the tablix properties to try and force a double page break to happen with no luck. I have also tried to drop a rectangle into the table and use the page break setting there, also no luck.
Any help would be appreciated.
Thanks,
Jessica
I've not used the multi-column layout so I can;t directly comment on that but what you could potentially do is use a subreport.
If the following does not help, post a sample of your data and your current report design and I'll post a full answer.
In short, create a report that only handles a single customer, so it will need to have a parameter passed into it that identifies each customer such as a CustomerID.
Once you have the report working with a single customer, create another report.
On this report create a dataset that just contains a list of customers you want to report on (so a list of CustomerID's for example).
Add a table to the report and remove all but a single "cell". Expand this cell to be roughly the width of your subreport (it does not have to be exact).
Set the dataset property of this table to the dataset containing your list of customers.
In the remaning cell, right-click then Insert >> Subreport. This will fill the cell with a subreport control. Right-click the subreport control and set the subreport to be the sub-report we created earlier that handles 1 customer. In the parameters, set the CustomerID parameter to the field from your customer list dataset.
Finally, right-click the 'details' rowgroup and set page breaks to 'between each instance'.
This will generate one subreport per customer and put a page break between each.

SSRS Display Chart next to Table when row selected

I have a table of Technicians which I have then linked to a Chart via Action and then Go to Report. I then selected my current report as the chart is on my current report. The chart is hidden until I Select a Technician Name from my table. This is taking very long and it looks like a new report is opening. Have I linked this correctly or is there another way to link a chart to a table when they are in the same report?
The properties setting:
Expected results
If you stick with what SSRS gives you out of the box then I don't think you can do what you are trying. As you noticed, when you do "go to report" it basically reloads the report from scratch, hence why it's slow.
The closest I could get was to create the chart as a subreport, add this to the main report in a new column and toggle visibility based on person name.
Below is a report I built that should be simple to adapt to your data if you decide it's suitable.
In case you are interested, I got this data from the WideWorldImporters.
I grabbed some basic data consisting of 'category', 'person', 'date' and 'amount' so structurally it should equate roughly to your screen shot in the finished report.
So first I created a report called _sub_chart. This takes a single personID as its parameter and produces a single chart like this
I then created the main report (the query was identical as I'm lazy just no WHERE clause).
The report is a simple table with parent group for CustomerCategoryName.
The detail row is hidden and visibility toggled by the CustomerCategoryName textbox (which is what you are already doing it seems).
I then appended a column and at the detail level, inserted a subreport. The subreport is set to point to the subreport created earlier and the parameter is set to personID field.
Finally I set the chart to be hidden and toggled visibility based on the Fullname textbox.
The final design looks like this.
When I first open the report it looks like this...
Clicking one of the categories gives us this.
and finally, clicking a person gives us this....
Note: Other than the less than pretty layout, this design cannot automatically collapse one name when you click on another so you can end up with lots of charts visible unless you collapse them once viewed.
Performance should be pretty good though so it might be a workaround for you.
To avoid the ugly gaps between names you could add a new detail row, merge the cells from fullname to ordercount and put the chart there instead. The chart would be stacked under the persons details but it a bit more compact and neater (imho) this way.
Anyway, I hope this was helpful - good luck

Generate single report for multiple user using SSRS

I need to create student certificate using SSRS. I created new .rdl file did designed and associated with data source.
It works for single student as expected. But it does not creates report with multiple certificate while my data source returns multiple student details.
I am new for SSRS, please help me out to achieve this.
If you want to generate a certificate for each row of your dataset in the same report, you can do this with a tablix:
Add a Tablix to you your report that lists your dataset data
Drag a Rectangle into one of the Details row cells
Make the cell you dragged the Rectangle into large enough to hold all your
certificate report items
Select all your certificate items and move them into the Rectangle
Update any references to your dataset to not include a 'scope'
ie: Change =sum(Fields!ColName.Value, "Your Dataset") to =sum(Fields!ColName.Value)
Run the report
You should now have a certificate for each row in your dataset.
If you want to export multiple separate certificates, you will need to set up a data driven subscription on your report, that runs it once for each row of a returned dataset. Obviously you will need to adjust your report to be able to receive which student to generate the certificate for as a parameter.
Another way is.. if your data set is returning one row per student, then all you need to do you on your tablix is to add a parent row group.. group on StudentID.. or something unique per record.. go to group properties and add a page break at end of group. This should generate one certificate page per student..
You may need to adjust group headings and footer and things like that appear.. You will figure it out... alternatively.. watch a youtube video on how to do a basic ssrs report.
I have a subreport call StudentSub.rdl. This is linked with DataSet (stored procedure) Sp_GetStudentName(#ClassNo int). This works fine it gives always only one certificate.
Since I wanted to generate class wise certifiacte, in that case I wanted to get muliple report page wise in one PDF file. Followed below steps:
Created new RDL file called StudentReports.rdl
Linked with same data set stored procedure Sp_GetStudentName.
Drag a table from tool box to design body.
Set visibility False for table Header and some columns except one td.
Right clicked in that box (td) and inserted sub report
Right clicked sub report properties selected StudentSub subreport.
In the sub report properties added parameter ClassNo then clicked Ok.
Now When I am previewing this StudentReports by passing class no. I am getting correct number of pages.
Hope this will help others.
Thanks!

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.

How to create a sub report when I click on Particular sector of Pie chart in SSRS reports

I have the requirement to generate chart in SSRS 2008 and clicking on specific region of chart I need to generate sub report. I am already done with pie chart and the report but not able to generate the sub-report dynamically
I need to generate different reports when I click on different bars in bar graph
can anyone help with that
A Subreport is a report already embedded in the report.
I think what you want is actually a Drill Through report where you click on an item and a new report pops up showing you the detail of whatever data you just clicked on.
You'll need to create a new report with a table. If your query has the detail you need, you can re-use the same query otherwise you need to create a query to show the detail you want.
You'll need to a parameter to filter for the value you select from your chart. Your chart says Emp_ID but I am guessing that's just a count and you really want the text from the X axis (i.e. Deliver Client projects... ) - your employee's Experience.
When you've created the drill through report with the parameter for the field, go back to the main report and add an ACTION. Specify your new drill through report, Add the parameter by selecting it in the Name drop down and select the field you want to get the value from (the category Group field from the bar chart).
Now when you click on a bar, your new subreport will open with the detail filtered by the field you click on. If you click on the bar for Delivered Client Projects and proficient, your new report with a table of the 31 employees will appear.
Here's some more detailed info:
https://technet.microsoft.com/en-us/library/aa337477(v=sql.105).aspx
https://msdn.microsoft.com/en-us/library/ff519554.aspx
You need to have already made the sub-reports and set your chart elements to load that report on their click through properties - You cannot simply generate a report by clicking on a report element.
If you want to go to different reports depending on data behind the pie chart section that is clicked on, you can set that up either in your original dataset with a column for which report to load or you can add a switch statement in the expression for the address of the report to load. To handle your parameters, this is probably easiest done with URL addressing.