Issues creating packing slip with page breaks - sql-server-2008

Ok, I'm going nuts here. I'm trying to create an order packing slip but having trouble grouping it all properly. A few details:
There can be multiple items on each packing slip(InventoryDescription & InventoryItemCount in my query below)
Packing slip needs to page break on each order id.
I need to also include in the footer, a message saying to contact customer service (see 2nd image below). This needs to be on the footer of each invoice.
Here's a sample of my data. The first 2 rows (John Smith. OrderID 40184) are multiple items within the same orderID, so they should be on the same packing slip. The other 2 rows (Amy Andrews & Paul Johnson) should each be on their own separate packing slip.
Here's an image of my work so far. I inserted a tablix, tried inserting everything into the data rows, then grouping on OrderID & ShipTo. The orderId group has a page break "Between each instance of a group" checked.
I've also provided a link to my current (mess of a) report, if you'd like to review.
PackingSlip.zip

What you want is a List. Insert a list, and group it on orderId. Set the Group to page break between each instance of the group as you had done. What you will find is that the contents of the List (which is actually just a rectangle) will be repeated for each Order Id the report encounters. You can pretty much just put everything on your current report within that List and it should work fine, including the table to group your InventoryDescription, InventoryItemCount etc. Only the ones that are against the OrderId in question will be shown on each slip

Related

SSRS Visual Studio 2017 - Grouped by date, but same date showing separately

I am working on a report that displays the returned items in a date range. I have configured the report to be grouped by the returned date and checked the box for the page break between each instance of a group so that each page of the report will display items with each returned date.
When I preview the report, only the first page displays the date and the items returned on the date. From the second page and on, the report displays one item per date, even though there are multiple items with the same date. It just shows all the items separately on each page with the same date.
I tried grouping the items, but it still did not work.
Below is how the report is set up right now. The [ActionDate] is the only one that is grouped.
Look in your row groups under the main design window.
You will have at least
one group for your returned date. This should only be grouped on the columns you want to exclude from the detail (in your case probably just returned date)
You should also have a details group (the icon to the left of the group name will be 3 lines rather than a '['. This details group should have no grouping
If you have any more groups listed, check if they are needed
Here's a sample of a report design with a single group (in this case email) and a details row group (which has not grouping).
If this does not help, edit your question and show a screen shot of you report design including the row groups panel and I'll edit this answer.

Can you link multiple tablixes on a key field in a single SSRS report?

I am creating a report in SSRS to show evaluation scores. It has three sections, and I need to link them all together on the PreceptorID field (2108 in this case). The top two sections are from the same query. I am filtering the results in each one to separate the counts because they have different column names. The third section is a subreport showing comments from evaluators. It also has the PreceptorID field in the data but is not displaying it. It has two parameters that should be populated by the main report query, but that does not appear to be happening. The report is returning all comments instead of only the ones with the matching PreceptorID.
This first image is from Crystal Reports showing how the finished product should look.
This is what I am getting from SSRS. It is showing counts for multiple people at the top. The counts in the middle are actually correct. They are all for the one person. The next person's counts are on the next page. The comments at the bottom are also not filtering on the one PreceptorID.
This image showing the subreport parameter that should be linking it back to the main query.
How can I tell all three sections to only return data for the same person on one page, and another person on the next page?
I would redesign the report structure slightly. This is only my personal preference, there are several ways to achieve this but I find this way easier to manage and maintain.
You'll need two subreports and a master report.
You already have the 2nd subreport so no extra work required there.
I would take you current report, strip out the link to the current subreport and change it so it only processes a single person (just like your existing sub report).
So SubReport1 will have the two tables from your current main report only. It will only accept a single person as a parameter (or pair of parameters in your case)
SubReport2 will be your current subreport. Again it only accepts a single person.
Next create a new report. This will be the master report.
Add a dataset that contains just enough info for list of people you want to report over. So the dataset query might be as simple as
SELECT PreceptorID, ClerkshipID FROM myTable ORDER BY PreceptorID
Add a table to this report and set it's dataset property to the dataset you just created.
Change the default (details) row group to group and order by whatever makes each record unique (maybe both the two columns listed above, may only one will be required, only you will know this).
Right-Click on the row header to the left of your table and do "Insert Row => Inside Group Below".
Remove all but one column
You should now have a table with 2 rows per group.
Right click the top cell in the group and do "Insert => Subreport", go to the subreport properties and point this to SubReport1 (or whatever you called it) and set the parameters has you have done previously.
Repeat this for second row, this time pointing to your second subreport.
In the row group properties, set page breaks to "Between each instance"
That should be it. This was done from memory so might not be 100% but based on the info in your question you should be able to work it out from here.
Things to check if this is not working
Open each subreport and test it by passing in parameters manually. Each subreport should only be returning data for a single person.
The master report should have a dataset that returns each person once i.e. if there are 10 people in total this dataset should only contain 10 rows.
The table in the master report should contain only two rows
Both rows must be EITHER within the same row group, or, if you have no other row groups, they will both be in the detail row group.
The report design should look something like this if you have a row group by person
or like this if you only have detail rows.
Finally, make sure the parameters you pass to your subreports are the Field values from your master report's dataset, NOT your master reports parameters.

SSRS - Merging cells of specific columns

I am developing a complex report in SSRS which should like below
Screenshot 1
output returned by stored proc have multiple rows of one User ID and based on that columns "Successful Orders -- Online - Total Orders", "Successful Orders -- Online - Total Amount" & likewise Retail - Total, Other - Total columns cells should be merged based on respective User Id.
I have used tablix control and tried adding grouping over columns which needs to be merged but it is not working as expected. in order to group I am setting Sum of returned Value in cell but yet no luck.
Can you please provide me some pointers in order to achieve whats expected. please let me know if you need more information
output after adding nested tablix
ScreenShot 2
also, distorted output with inner tablix. borders are causing issues
ScreenShot 3
Try placing a tablix in the cells containing the multiple rows to display them. Basically, you need to switch your approach from "How do I merge these cells?" to "How do I split these cells." Set up your grouping at the level you want your totals and then in each of the columns where you want the details displayed, add a tablix to display the details. You'll need to play with the grouping a bit to get it display correctly.
More details:
The sample you provided above should be one group level row, not multiple detail level rows. Add your group to that Tablix and the summaries you want for your Total columns. Then Merge each of the "Mode" and "Count" column pairs and insert a Tablix into that merged cell with the same grouping as the row with the Totals, but with only the Details row displayed (don't add group header or footer and delete the blank row and summary column that automatically gets added). Now just set your field values for Mode and Count and adjust your column widths to match the headings.
Here's a REALLY simple report that displays a Plant and the employees associated with that plant. This is the top level where you Totals group would go. The next image is the "inner" part, where you would add in another Tablix with the same group(s), but only the details displayed.
This is super simple example and you may need to include additional levels of grouping to match your report, but the fundamentals still the same - an "outer" Tablix with an "inner" Tablix with matching group(s).
There's a lot you can do with this approach by manipulating the groups, hiding/displaying different groups or even hiding the details and displaying subtotals.

Prevent like data from grouping in table? SSRS

I've seen how to's on how to display combined data however, I would like to keep all data separate in their own rows and columns. It seems to have to do with grouping, but when I attempt to delete the grouping, the report has an error when trying to run. I would like to prevent the cells from combining like in this
When you are creating a report in the wizard, any items that are set in the red Group section will create a new grouping.
You want to place all the fields you want to see in the blue Detail section of the wizard. There is no grouping in the details. If you have a group
Putting fields in the orange Page section will cause a new page to be created for every new value.
In this example, the wizard will create a report that will Page based on the Region. Each region will have it's own section that includes a Vendor group and each vendor group consists of member claims (it's in health care). It will create a new page for each region then group each vendor's members claim within that region.

How can I display two different tables from the same dataset in Reporting services?

There is a lot of posts that talk about using different sources for this, but I haven't found any that cover my scenario using the same data, while page breaking in between common groupings. I cannot adjust the stored procedure due to some compatibility issues, and am trying to figure out how to do this in the report itself.
Here is what I need to accomplish:
We deliver items to various people in the same job order. Each person will get his own shipment list, so I group by the person delivered to, and page break after his list is finished.
The list of sent items that the person gets should not include pending items. Rather, that should display as a separate table right below the first shipment list of what the person was sent.
The data returned in the stored procedure will include a flag on each detail indicating if the item is pending or not.
Our report should look like this:
---- Report header information ----
---- Deliver to John Joe -----
(Table with all items sent) // These need to belong to just John Joe's group
(Table with all items pending) // These need to belong to just John Joe's group
Page break, then on a different page
---- Report header information ----
---- Deliver to Max Manny --------
(Table with all items sent) // These need to belong to just Max Manny's group
(Table with all items pending) // These need to belong to just Max Manny's group
What I've found so far:
Can't nest tablix controls, since dynamic cant nest inside dynamic
It's almost like I need to be able to apply a grouped bit of data to a data context, such as a rectangle, and have both tables feed off of the same source, but havn't found a way to do this.
If i just do two tablix controls on top of each other, the page breaking doesn't work right, since I need to break after each instance of group. But this happens for both tablix controls if I set this, so the result ordering gets messed up.
Thanks for any comments or suggestions you can provide, it's much appreciated!
The suggestion in the comments by #Martin Soles will work nicely. Another way I've done this in the past is to use nested tables: first add a row group for the recipient, set this group to page break, add some extra rows in the group, and merge cells on the remaining rows:
Next select your empty row and insert a table:
Finally add a filter on each nested table to only show sent or pending items. This can also be useful when you want a different number of columns on each inner table.