SSRS Exporting to Excel worksheet name changes based on Parameter - reporting-services

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.

Related

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.

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.

Naming of Excel sheets or tab in SSRS

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.

SSRS 2005 report with multiple datasets need to change parameter

All,
I've been working on a custom timesheet report that uses multiple datasets (8 to be exact). Each dataset selects the data by the same ID field which is currently input as a parameter. It works great like that. But now I'm told that the end user wants to input a date and have all the reports printed out for that date rather than having to enter in an ID each time. Each timesheet is 2 - 3 pages. It is intended to emulate a form and contains some data but a lot of blank areas to allow the field people to write in any changes that have occurred.
My question, is this: what is the best way of accommodating the new requirement? Should I build it all as one big dataset and use the date as a parameter?
Should I create a wrapper report that would prompt for the date and then use the existing report as sub report? Would that even work?
Is there any way I can just create a new date parameter and put that ahead of the ID parameter and get them to print out like that? I've got a few hidden parameter fields on the body that get used in the page header and are used to link some of the datasets.
any help is appreciated.
Easiest way to achieve this is indeed by creating a wrapper report with the date parameter. The data set in this report will then fetch all items (with ID) that match the query by the user. The report can then have a list for that dataset, with the original report as a subreport. If you pass the ID parameter from the dataset to the subreport you wouldn't need to change hardly anything in the original report.
Two things to watch out for:
the Report Header and Footer in a subreport are not rendered - these are only rendered for the wrapper report
you may need to tweak your page breaks in the subreport and on the new list in the wrapper report so each new form starts on a fresh page