Here is how i got to the end goal, i had some help from UTaylor, he webex’d over early in the process and gave me some direction.
TL:DR- I used a sub Report on the packslip to create a secondary report that grabs the order via the OrderNum to pull all of the open lines that are on the order. This gets you the parts on the order number from the packslip so that the person can know exactly how many lines/items have been shipped and how many have been backordered.
For those that want more info the solution is as follows:
1: Took a copy of the SSRS Version of the packslip and called it by a different name.
2: I modified the packslip so that it can expand and contract with various parts of the pack slip that are
not needed, like in the ship to and sold to.
3: I then went and created another report that is located in the same folder as the Custom Reports PackSlip, I called it TestReport. (i know how original)
4: Give your new subReport a parameter that it can use from the main report.
I used the Order Number from the packslip off of the shipdetaildataset that was preconfigured.
5: Within this TestReport, i needed to create a data source, Right Click DataSources and add New,
Name The Datasource so that you will not get it mixed up if you have multiple data sources.
Use a Connection embedded in my report.
Connection Type: Microsoft SQL Server.
Click the Credentials Tab,
Click the Use this UserName and password option,
NOTE: This should be a READ Only UserName and Password.
This will be a user name and password that has access to the specific databases that you need to get info from.
6: After the Data source is figured out, Then you need to create a Data Set.
Click the Use a Dataset Embedded in my report.
Choose the data source that you just created in step 5.
7: Now comes the Big part, Creating a Query,
Obviously if you have done this before its not that bad but for people who may have this issue in the future just look up basic SQL query and you should find something.
I only needed to get the OrderDtl table along with the ShipDtl table and combine them so that i was able to get the items that i needed to finish the report.
I was able to get the query to run based off the parameter that was passed to the report so that the only thing that i am getting is the one order from the query.
8: After you got the query all figured out, you need to add fields.
Fields are the items that you will be using in the report itself.
i added a field for all of the items that i specifically called from the query,
OD_Company as the field Name and OD_Company is the field Source which is the same name from the query.
9: Once you get the report for the items you need you can sub report the TestReport back into the pack slip. when you go to add it into the pack slip make sure that you place a rectangle first, i say this because if you don’t then it will always run the sub report every time that you run the pack slip. I also added a page break so that it does not get caught on the page break and spilts the back order report onto multiple pages.
I put this piece of code into the visibility of the rectangle as i don’t want the sub report to show if the back ordered quantity is not greater than 0.
=IIf(Sum(Fields!Calc_DspBackOrdQty.Value, “ShipHeadShipDtl”) > 1,False,True)
Inside of the rectangle i inserted a Sub Report. what this does is calls a report that you declare,
in the box for the Use This report as a sub report. When you click browse it should open up into the folder where the pack slip report is at, this should put you in the same folder where you saved TestReport. Choose your report that you want to Sub Report into the packslip.
it will give you this really long set of folders that it should be in,
/Epicor10Test/reports/CustomReports/PackingSlip/TestReport
we want to pair this down to what actually works when it is in the report.
TestReport
This should be the only thing that you need to have in the box to get the subreport to run. It sounds funny but it works.
Click on the parameter tab,
Name should be the Parameter that the sub report needs to use, and then the value is what it should use from the packslip report for the value of that parameter.
Mine was OrderNum: =First(Fields!OrderNum.Value, “ShipHeadShipDtl”)
After that i ran the report builder and made sure that it worked and printed out the packslip with the backordered lines that are and are not on the packslip.
EX.