linking a subreport to a main report and have the data in the table match in SSRS - reporting-services

I am trying to take a report that has employee pay data for a specific date range. It works fine. My problem is I need to take and put in YTD data of hours worked and total paid from the beginning of the year to the ending date parameter. I created a subreport that gets me that data. What I am having trouble with is getting the subreport to return the data, per employee, in line with the main data. When I used Crystal Reports I could link the main table to the subreport without creating parameters. Not sure if there is an equivalent or a work around. Thanks in advance
Mike

Related

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?

Need to write SSRS report that uses stored procedure with a pivot as a dataset but I can't get the report to be dynamic, is this even possible?

I have a bear of a problem here. The user wants a report that shows the earnings, deductions and liabilities (EDL) code of each employee or null/blank if an EDL code doesn't apply to that employee. I needed one row for each employee name and columns for each possible EDL code combination. I got that answer fixed from my previous question here:
Struggling with a dynamic pivot on multiple columns with one being concatenated
I ran into a problem where there are a potential 270 column headings (EDL code combination with "subj", "elig" or "amt" appended) but not every employee will have a value for every column and security settings lock me out of seeing 1 of the 3 payroll groups. This made my report very limited in that when I ran it I could only show on the Crystal Report the data for what columns I had at the time I created the Crystal Report. Well, the user who requested this report has access to payroll group 1 and if even one of those employees had an EDL code that I didn't have in my data when I created the Crystal Reports file then the report wasn't useful to the user. We figured a way for her to get the info she needed by her logging into SQL Server and executing the stored procedure and she did what she needed to do with the data.
Fast forwarding to today I have to create this as a report in SSRS or give detailed instructions on how she can do this in the future if need be since my contract is coming to an end. I'm not familiar with SSRS but I thought maybe that would meet her needs over Crystal Reports. However, I'm running into the same problem. When I add the stored procedure as a dataset (adding it in as text to execute, not clicking the stored procedure radio button) I only see the EDL codes from that particular query not all potential combinations. I need a way to maybe dynamically add columns to the SSRS report, does such a thing exist?

SSRS 2008 R2 Subreport Displays Only on First Page

Long time browser of this site, but first time poster. Normally I'm able to find the answer I need by searching, but in this case I haven't been able to, and it's driving me nuts!
I'm using BIDS / SSRS 2008 R2 to create a membership renewal form which my business will mail out to our customers. The form contains customer information, including membership dues / subscription info and other billing details.
In order to accomplish this,
I have built three RDLs:
Main report (this is one the users run). Contains base data set
(let's call it Proc 1), which requires an expiration date only, to
pull a list of member IDs and corresponding physical information
(address, phone, membership type, etc.) Contains the first subreport,
in a list, grouped by member ID.
One subreport for the first page in the main report. Contains a
set of parameters for each field it needs. Rather than execute Proc 1
again, I pass Proc 1's output from the main report to this subreport.
Everything in this subreport is also contained within a list, grouped
by member ID parameter (passed from main report).
Another subreport, nested within the first subreport, which pulls
subscription information. First subreport passes member ID and paid
through date to detail data set in nested subreport (let's call it
Proc 2). Proc 2 requires paid through date from page one subreport,
and ONE member ID, which it gets from its parent report. It displays
this information in a table, not grouped, since it should only be
receiving one ID at a time--- being that its parent subreport. and the
main report. are already grouped. However, I have tried grouping the
table based on member ID, and it didn't make a difference.
I found this approach necessary, because of the fact that I had two write two separate stored procs: one to pull the basic data, and one to pull detailed billing data. It's impossible to combine the two without creating duplicate rows. And of course, it's not possible to have a tablix assigned to a different data set than the list it is contained within. Hence the need for a subreport. I hope that all makes sense.
Anyway, my issue is that the nested subreport only displays data for the first customer. In fact, it doesn't display the nested subreport AT ALL for the rest of the customers. It's as if the nested subreport is only being passed the first member ID, but I don't see how that's possible given the grouping? Note that I am not using any FIRST or aggregate functions in the proc or report expressions. And I can execute each report file just fine individually.
I have tried creating a dummy data set in the nested subreport (ex. SELECT 'Nothing' AS Nothing) and adding it to a text box, thinking that this would force the nested subreport to display, but it STILL doesn't. Thoughts on what I might be doing wrong? Thanks in advance.
https://social.msdn.microsoft.com/Forums/en-US/9f8b9c42-90cb-4620-ad91-9754029ed4db/seemingly-random-error-subreport-could-not-be-shown-in-a-report-with-nested-subreports-ssrs?forum=sqlreportingservices
Your nested subreport could be throwing an error that your not seeing.
Quote
The known issue in SQL Server 2008 Reporting Services described in http://support.microsoft.com/kb/967749 should be fixed in SQL Server 2008 R2. Generally, the issue occurs because the parameter value is not passed to the subreport correctly or the subreport is not valid due to the specific values passed to the subreport.
I think you should add a detail group then put the subreport in that cell. Make sure the grouping is working correctly and pass the right values to the subreport.

SSRS 2008 R2 - Repeat textbox/table on all pages

I have a report in SSRS which basically contains a table of dates and blank columns for users to print and then manually write data into.
The report has a #FromDate and a #ToDate parameter as well as a #Location parameter.
The #FromDate and #ToDate parameters are used to populate a table with dates and is grouped per week (Mon to Sun) with a few extra columns that are blank for manually writing data. Above this table there is a textbox containing employee name.
What I am trying to do is to get the employee name to change for every page according to the #Location parameter. So if a location has 10 employees I need 10 pages with the different employees names at the top so 1 page per employee. The main table with the dates should repeat but the data will be exact on each page, basically the only thing that will be changing is the employee name at the top of the report.
Currently I have tried creating a table with just a header and adding the employeename field into the header but it only returns the 1st employee within the dataset and only returns 1 page when there should be 26.
What would be the best way to achieve this? It seems simple enough in theory but can't get it to do what I need.
A rough outline:
Create a subreport that shows your calendar. It will take the two date parameters.
Create a parent report.
The dataset in the parent should return a list of Employees for the selected location.
Create a table for that dataset, and put two detail rows in that table. The first will just have Employee name.
Test at this point and see that you just get a list of employees.
Place your subreport in the second detail row, and set the parameters to be handed through.
Change the properties of the detail group to have a page break between instances.
If you let us know what isn't working for you, we can give more specific advice.

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