Naming of Excel sheets or tab in SSRS - reporting-services

I am making a report in SSRS that will be exported to Excel. It displays data from all departments in organization.
The first sheet of the report will have a static name for e.g. "Master Report" and it will display data of all departments in single sheet.
Other sheets will have dynamic name depending on department and will display data of that particular department.
So it will become something like as shown in picture below.
I have already made the Master Report and now I want to display those individual department reports but problem is how do I name those sheets? Both these reports will use different data set. If I set the InitialPageName property of report to "Master Report" then it sets this name for all sheets. If I use an expression for e.g. =First(Fields!Dept_Title.Value, "ALL_DEPARTMENTS") then it picks up first department name and then use it for all sheets because as I told above, there are two different data sets.
Using subreport is of no help either because it doesn't show subreports InitialPageName as Excel sheet name and always uses Main reports name.
How to solve this issue?

Ok I got the solution. Just came to know about Group PageName property. So now I have two tablix in my report. One is at top which is showing Main Report while other is below which will show department reports. I have set InitialPageName property of report to "Master Report" while in Group PageName property of tablix2, I have defined expression Fields!Dept_Title.Value and it's working.

Related

SSRS Exporting to Excel worksheet name changes based on Parameter

I'm currently building an SSRS report and it gets rendered to excel. I'm trying to figure out how to set up the report so that it creates multiple Worksheets (Tabs) of the data on the report and to show the names of the excel tabs even when there's is No data in the group.
I know that entering a page break in the report gives you a new names for each worksheet, and that works fine when THERE IS data in the group, but I need the tab names to show when there's NO data in the the group. Instead of just giving me the name of the report or 'Sheet1'.
For example:
My group is called Region and my Parameter is called Region. If I select the EastCentralRegion on the Parameter and there's no data for that region I would still want the Excel worksheet tab to show 'EastCentralRegion'.
I tried setting the page break to the parameter, but that was only giving me the same results.
Anyone know how this is done? Let me know if you want some pictures as examples.

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!

ssrs export to excel tab names on empty tablix

I have a report with multiple tablixes each nestled in separate rectangles I have the page break set and page name assigned in each tablix. The problem appears that if a tablix has no data the excel tab shows the table header but the tab name appears to hold from the prior tab name. For example I get Summary ta, labor tab equipment tab and equipment(2) tab because the table following equipment is empty.
So the report is pretty much a data dump with multiple tablixes that represent different data, for for example safety, quality, etc. The tablixes are inside separate rectangles.
I created separate datasets for each tablix that gets the table name. The table name is a translation for the language that name is to render, English, Spanish, etc.
I created a parameter for each table tab name that now holds the name for the table tab.
I set each tablix pagename to the corresponding parameter.
Now when I export to Excel each tab has the appropriate tab name in the appropriate language.
I had the same issue. Here's what I did to solve it:
Had a check in sql if count of rows is 0 then 'NA' will be the value for all columns; otherwise original values from table.
In SSRS, I am going to hide the text box if it has a value "NA".
You can try to hide the entire row in ssrs if the value is "NA". But its not going to work. Hiding the individual text box will work for sure.
Condition to hide: IIF(Fields!columnname="NA",true,false)
After all these steps if you export to excel it will show the group name you have given.

SSRS Create Tabs Dynamically

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.

Questions about exporting report to Excel

I'm using SSRS 2008, I have a table report which includes a Region column that all other columns are grouped by it.
I needed the report to be divided in different excel sheets when exporting it, which I have already done.
I also needed to not include the region column in the report itself, so I hide it.
But when exporting it to Excel I get Column A as a blank column that the user needs to delete.
So I have the following questions:
How can I exclude a column from a report but still keeping it as a group and breaking the report by it?
How can I get the names of each sheet to display the names of the Regions?
Thank You!
Ok, I found the answers:
I deleted the column but kept the Group when the question was prompt to me.
On tablix member properties (when clicking on the relevant group) there is "Group" > "Page Name" > expression > =Fields!Region.Value.
It works great!