Job Traveler with NonStock status

Hi all,

I’m stuck trying to get a stock SSRS report JobTrav to add and display NonStock status.
I’ve created a RDD
Added the PART table to that
Set a relationship JobHead2Part (Parent=Part, Key=PK_Part, Child=JobHead) so Company & PartNum are the relationship fields.

I then created a copy of the SSRS report style, gave it a new name and set the data definition to my new one. Did the ‘Sync Dataset’ and moved over to report builder with the GUID after running the new report style.

I run the report, input the GUID and its OK. I get into trouble when I try to add the ‘NonStock’ field.
I found online to add the Left Outer Join and I believe I should be using T9, I added the field (NonStock) to the JobHead Dataset Properties and then drag the field to the report.

Changed the expression to =Fields!NonStock.Value
When I run the report that field is empty, I was expecting to see a true or false, my joins are below and I can post the rest if that is helpful.

, T9.[CheckBox01], T9.[CheckBox02], T9.[CheckBox3], T9.[Date01], T9.[desc_obsolete_c], T9.[Selling_Type_c]
FROM JobHead_" + Parameters!TableGuid.Value + " T1
LEFT OUTER JOIN JobAsmbl_" + Parameters!TableGuid.Value + " T2
ON T1.Company = T2.Company AND T1.JobNum = T2.JobNum
LEFT OUTER JOIN JobOper_" + Parameters!TableGuid.Value + " T3
ON T2.Company = T3.Company AND T2.JobNum = T3.JobNum AND T2.AssemblySeq = T3.AssemblySeq
LEFT OUTER JOIN JobOpDtl_" + Parameters!TableGuid.Value + " T4
ON T3.Company = T4.Company AND T3.JobNum = T4.JobNum AND T3.AssemblySeq = T4.AssemblySeq AND T3.OprSeq = T4.OprSeq
LEFT OUTER JOIN ResourceTimeUsed_" + Parameters!TableGuid.Value + " T5
ON T4.Company = T5.Company AND T4.JobNum = T5.JobNum AND T4.AssemblySeq = T5.AssemblySeq AND T4.OprSeq = T5.OprSeq AND T4.OpDtlSeq = T5.OpDtlSeq
LEFT OUTER JOIN JobMtl_" + Parameters!TableGuid.Value + " T6 ON T1.[Company] = T6.[Company] AND T1.[JobNum] = T6.[JobNum]
LEFT OUTER JOIN TTJobPartMtl_" + Parameters!TableGuid.Value + " T7 ON T6.[Company] = T7.[Company] AND T6.[JobNum] = T7.[JobNum] AND T6.[MtlSeq] = T7.[MtlSeq]
LEFT OUTER JOIN PART_" + Parameters!TableGuid.Value + " T10 ON T1.[Company] = T10.[Company] AND T1.[PartNum] = T10.[PartNum]
LEFT OUTER JOIN SubAsmbl_" + Parameters!TableGuid.Value + " T8 ON T2.[Company] = T8.[Company] AND T2.[JobNum] = T8.[JobNum] AND T2.[AssemblySeq] = T8.[Parent]
"

Hey Paul,

Looks like you’re on the right track. When you added the part table to the RDD, did you set the Relation Type to “Output”?

Another thing to try would be to restart from scratch, and this time don’t click “SYNC DATASET”. It usually does more harm than good, and I’ve only seen it work on BAQ reports.

Can you post the whole SQL query?

I did leave it as ‘Output’

I was hoping to avoid starting from scratch but it may be worth it at this point.

Am I at least correct in assuming if a report has a BIT type dragged onto it the field should display True or False?

=“SELECT T1.DueDate,T1.IUM,T1.ProdQty,T1.ReqDueDate,T1.StartDate,T1.Calc_MultiJobParts,T1.Calc_OrderQty,T1.Calc_StockQty, T2.AssemblySeq,T2.BomSequence,T2.Company,T2.[Description],T2.DrawNum,T2.IUM as JobAsmbl_IUM,T2.JobNum,T2.OverRunQty,T2.PartNum,T2.PullQty,T2.RequiredQty,T2.RevisionNum,T2.Calc_BCAsmSeq,T2.Calc_BCJobNum,T2.Calc_BCPartNum,T2.Calc_BCRevNum,T2.Calc_comment, T3.CommentText,T3.Instructions,T3.DaysOut,T3.DueDate as JobOper_DueDate,T3.EstProdHours,T3.EstSetHours,T3.Machines,T3.OpCode,T3.OpDesc,T3.OprSeq,T3.PrimaryProdOpDtl,T3.PrimarySetupOpDtl,T3.ProdStandard,T3.RunQty,T3.StartDate as JobOper_StartDate,T3.StdFormat,T3.Calc_BCOpCode,T3.Calc_BCOprSeq,T3.Calc_DispStatus,T3.Calc_OPText,T3.Calc_OPType,T3.Calc_PurPoint,T3.Calc_VendorId,T3.Calc_VendorName,T3.OpCode_OpDesc, T4.CapabilityID,T4.ConcurrentCapacity,T4.DailyProdRate,T4.OpDtlSeq,T4.ProdCrewSize,T4.ResourceGrpID,T4.ResourceID,T4.SetUpCrewSize,T4.SetupOrProd,T4.Calc_BCCapabilityID,T4.Calc_BCResGrpID,T4.Calc_BCResourceID,T4.Calc_CapbltyDesc,T4.Calc_ResDesc,T4.Calc_ResGrpDesc,T4.Calc_SchedResDesc,T4.Calc_SchedResGrpDesc,T4.Calc_SchedResGrpID,T4.Calc_SchedResID, T5.ResourceGrpID as ResourceTimeUsed_ResourceGrpID,T5.ResourceID as ResourceTimeUsed_ResourceID,T5.WhatIf
, T1.[ContractID], T1.[CustID], T1.[CustName], T1.[DaysLate], T1.[EPMExportLevel], T1.[ExternalMES], T1.[ExternalMESLastSync], T1.[ExternalMESSyncRequired], T1.[GroupSeq], T1.[IsCSRSet], T1.[JobCSR], T1.[JobWorkflowState], T1.[LastChangedBy], T1.[LastChangedOn], T1.[LastExternalMESDate], T1.[LastScheduleDate], T1.[LastScheduleProc], T1.[PCLinkRemoved], T1.[PlanGUID], T1.[PlanUserID], T1.[ProcSuspendedUpdates], T1.[ProjProcessed], T1.[ProjProcessedDate], T1.[RoughCut], T1.[SchedPriority], T1.[SyncReqBy], T1.[UnReadyCostProcess], T1.[Calc_BOMSequence], T1.[Calc_custADDR1], T1.[Calc_custADDR2], T1.[Calc_custADDR3], T1.[Calc_custCITY], T1.[Calc_custCountry], T1.[Calc_custID], T1.[Calc_custName], T1.[Calc_custStat], T1.[Calc_custZIP], T1.[Calc_LangID], T1.[Calc_UserName], T1.[Calc_XPartNum], T1.[ExpenseCode_Description], T1.[PartNum_MfgComment], T1.[PartNum_PartDescription], T1.[PartNum_PurComment], T1.[PartNum_TrackDimension], T1.[PartNum_TrackLots], T1.[PartNum_TrackSerialNum], T1.[PersonID_Name], T1.[ProdCode_Description], T1.[ProdTeamID_Description], T1.[ProdTeamID_Name], T1.[ProjectID_Description], T1.[QuoteNum_CurrencyCode], T1.[SchedCode_Description], T2.[AssemblyMatch], T2.[DigitalFileName], T2.[JdfPrepressAction], T2.[JdfStatus], T2.[LinkToContract], T2.[OperationType], T2.[OrigStructTag], T2.[PartPlanInfo], T2.[PrepressJobName], T2.[PressDevice], T2.[ReassignSNAsm], T2.[RemovedFromPlan], T2.[SendToPrePress], T2.[SendToPress], T2.[SendToPressInitiator], T2.[TLAODCCost], T2.[Calc_NewPage], T2.[Calc_ParentDesc], T2.[Calc_ParentNum], T2.[Calc_PartUDChr1], T2.[Calc_PartUDChr2], T2.[Calc_PartUDChr3], T2.[Calc_PartUDChr4], T2.[Calc_PartUDDat1], T2.[Calc_PartUDDat2], T2.[Calc_PartUDDat3], T2.[Calc_PartUDDat4], T2.[Calc_PartUDDec1], T2.[Calc_PartUDDec2], T2.[Calc_PartUDDec3], T2.[Calc_PartUDDec4], T2.[Calc_PartUDInt1], T2.[Calc_PartUDInt2], T2.[JobNum_PartDescription], T2.[WarehouseCode_Description], T3.[ActualEndDate], T3.[ActualEndHour], T3.[ActualStartDate], T3.[ActualStartHour], T3.[AutoSpcEnable], T3.[AutoSpcPeriod], T3.[AutoSpcSubgroup], T3.[CurrentPkgCode], T3.[EstStdDescription], T3.[EstStdType], T3.[ExpCycTm], T3.[ExpGood], T3.[ExpPctUp], T3.[FSJobStatus], T3.[GeneralPlanInfo], T3.[JDFOpCompleted], T3.[LastPCIDPrinted], T3.[LastPrintedDate], T3.[MaterialColorRating], T3.[MiscInfo1], T3.[MiscInfo2], T3.[MobileOperation], T3.[NonProdLimit], T3.[PartQualEnable], T3.[PctReg], T3.[PrinterID], T3.[ProdUOM], T3.[QtyPerCycle], T3.[RequestMove], T3.[ReWork], T3.[SetupMaterial], T3.[SetupURL], T3.[WIQueStartDate], T3.[Calc_BCOperCode], T3.[Calc_OpDesc], T3.[Calc_RPTUSERID], T3.[Calc_scrapQty], T3.[SetupGroup_Description], T3.[VendorNum_Name], T3.[VendorPP_Name], T4.[AutoSystemAdded], T4.[IsPrimaryProd], T4.[IsPrimarySetup], T4.[MobileAllocatedResource], T5.[Calc_RTUResDesc], T5.[Calc_RTUResGrpDesc], T6.[BackFlush], T6.[BasePartNum], T6.[BaseRequiredQty], T6.[BaseRevisionNum], T6.[BaseUOM], T6.[BorrowedQty], T6.[EstBurUnitCost], T6.[EstLbrUnitCost], T6.[EstMtlUnitCost], T6.[EstSubUnitCost], T6.[FindNum], T6.[IsPOCostingMaintained], T6.[IssuedComplete], T6.[IssuedQty], T6.[LoanedQty], T6.[MfgComment], T6.[MtlSeq], T6.[Ordered], T6.[OrigGroupSeq], T6.[PickError], T6.[PlannedQtyPerUnit], T6.[POCostingDirection], T6.[POCostingFactor], T6.[POCostingUnitVal], T6.[PricingUOM], T6.[RelatedOperation], T6.[ReqDate], T6.[ReqRefDes], T6.[Rpt1BillableUnitPrice], T6.[Rpt1UnitPrice], T6.[Rpt2BillableUnitPrice], T6.[Rpt2UnitPrice], T6.[Rpt3BillableUnitPrice], T6.[Rpt3UnitPrice], T6.[SalvageEstBurUnitCredit], T6.[SalvageEstLbrUnitCredit], T6.[SalvageEstMtlUnitCredit], T6.[SalvageEstSubUnitCredit], T6.[SelectForPicking], T6.[ShowStatusIcon], T6.[StagingBinNum], T6.[StagingLotNum], T6.[StagingWarehouseCode], T6.[WarehouseCode], T6.[Weight], T6.[WeightUOM], T6.[WhseAllocFlag], T6.[WIReqDate], T6.[Calc_BCMtlSeq], T6.[Calc_InventoryQty], T6.[Calc_InventoryUOM], T6.[Calc_MtlFixedQty], T6.[Calc_MtlPartDesc], T6.[MiscCode_Description], T6.[VendorNum_Address1], T6.[VendorNum_Address2], T6.[VendorNum_Address3], T6.[VendorNum_City], T6.[VendorNum_Country], T6.[VendorNum_CurrencyCode], T6.[VendorNum_DefaultFOB], T6.[VendorNum_State], T6.[VendorNum_TermsCode], T6.[VendorNum_VendorID], T6.[VendorNum_ZIP], T6.[VendorPP_Address1], T6.[VendorPP_Address2], T6.[VendorPP_Address3], T6.[VendorPP_City], T6.[VendorPP_Country], T6.[VendorPP_PrimPCon], T6.[VendorPP_State], T6.[VendorPP_Zip], T7.[MtlDescription], T7.[MtlPartNum], T8.[Parent], T8.[Calc_WhseCode]
, T9.[CheckBox01], T9.[CheckBox02], T9.[CheckBox3], T9.[Date01], T9.[desc_obsolete_c], T9.[Selling_Type_c], T9.[NonStock]
FROM JobHead_” + Parameters!TableGuid.Value + " T1
LEFT OUTER JOIN JobAsmbl_" + Parameters!TableGuid.Value + " T2
ON T1.Company = T2.Company AND T1.JobNum = T2.JobNum
LEFT OUTER JOIN JobOper_" + Parameters!TableGuid.Value + " T3
ON T2.Company = T3.Company AND T2.JobNum = T3.JobNum AND T2.AssemblySeq = T3.AssemblySeq
LEFT OUTER JOIN JobOpDtl_" + Parameters!TableGuid.Value + " T4
ON T3.Company = T4.Company AND T3.JobNum = T4.JobNum AND T3.AssemblySeq = T4.AssemblySeq AND T3.OprSeq = T4.OprSeq
LEFT OUTER JOIN ResourceTimeUsed_" + Parameters!TableGuid.Value + " T5
ON T4.Company = T5.Company AND T4.JobNum = T5.JobNum AND T4.AssemblySeq = T5.AssemblySeq AND T4.OprSeq = T5.OprSeq AND T4.OpDtlSeq = T5.OpDtlSeq
LEFT OUTER JOIN JobMtl_" + Parameters!TableGuid.Value + " T6 ON T1.[Company] = T6.[Company] AND T1.[JobNum] = T6.[JobNum]
LEFT OUTER JOIN TTJobPartMtl_" + Parameters!TableGuid.Value + " T7 ON T6.[Company] = T7.[Company] AND T6.[JobNum] = T7.[JobNum] AND T6.[MtlSeq] = T7.[MtlSeq]
LEFT OUTER JOIN PART_" + Parameters!TableGuid.Value + " T9 ON T1.[Company] = T9.[Company] AND T1.[PartNum] = T9.[PartNum]
LEFT OUTER JOIN SubAsmbl_" + Parameters!TableGuid.Value + " T8 ON T2.[Company] = T8.[Company] AND T2.[JobNum] = T8.[JobNum] AND T2.[AssemblySeq] = T8.[Parent]
"

I think it should show something, whether true/false or 1/0.

Query looks OK to me, especially since you aren’t getting any errors. When you added the Part table to the RDD, did you uncheck “Exclude” for the non-stock field?

Yes, as well as the PartNum field on the Part and JobHead table

Gotcha, well all looks good to me. I would just try recreating the report style without clicking sync dataset.

Tried to start from scratch and skipped the report style sync as suggested. Still no luck.
Part Table is now T6

=“SELECT T1.DueDate,T1.IUM,T1.ProdQty,T1.ReqDueDate,T6.NonStock,T1.StartDate,T1.Calc_MultiJobParts,T1.Calc_OrderQty,T1.Calc_StockQty, T2.AssemblySeq,T2.BomSequence,T2.Company,T2.[Description],T2.DrawNum,T2.IUM as JobAsmbl_IUM,T2.JobNum,T2.OverRunQty,T2.PartNum,T2.PullQty,T2.RequiredQty,T2.RevisionNum,T2.Calc_BCAsmSeq,T2.Calc_BCJobNum,T2.Calc_BCPartNum,T2.Calc_BCRevNum,T2.Calc_comment, T3.CommentText,T3.Instructions,T3.DaysOut,T3.DueDate as JobOper_DueDate,T3.EstProdHours,T3.EstSetHours,T3.Machines,T3.OpCode,T3.OpDesc,T3.OprSeq,T3.PrimaryProdOpDtl,T3.PrimarySetupOpDtl,T3.ProdStandard,T3.RunQty,T3.StartDate as JobOper_StartDate,T3.StdFormat,T3.Calc_BCOpCode,T3.Calc_BCOprSeq,T3.Calc_DispStatus,T3.Calc_OPText,T3.Calc_OPType,T3.Calc_PurPoint,T3.Calc_VendorId,T3.Calc_VendorName,T3.OpCode_OpDesc, T4.CapabilityID,T4.ConcurrentCapacity,T4.DailyProdRate,T4.OpDtlSeq,T4.ProdCrewSize,T4.ResourceGrpID,T4.ResourceID,T4.SetUpCrewSize,T4.SetupOrProd,T4.Calc_BCCapabilityID,T4.Calc_BCResGrpID,T4.Calc_BCResourceID,T4.Calc_CapbltyDesc,T4.Calc_ResDesc,T4.Calc_ResGrpDesc,T4.Calc_SchedResDesc,T4.Calc_SchedResGrpDesc,T4.Calc_SchedResGrpID,T4.Calc_SchedResID, T5.ResourceGrpID as ResourceTimeUsed_ResourceGrpID,T5.ResourceID as ResourceTimeUsed_ResourceID,T5.WhatIf
FROM JobHead_” + Parameters!TableGuid.Value + " T1
LEFT OUTER JOIN JobAsmbl_" + Parameters!TableGuid.Value + " T2
ON T1.Company = T2.Company AND T1.JobNum = T2.JobNum
LEFT OUTER JOIN JobOper_" + Parameters!TableGuid.Value + " T3
ON T2.Company = T3.Company AND T2.JobNum = T3.JobNum AND T2.AssemblySeq = T3.AssemblySeq
LEFT OUTER JOIN JobOpDtl_" + Parameters!TableGuid.Value + " T4
ON T3.Company = T4.Company AND T3.JobNum = T4.JobNum AND T3.AssemblySeq = T4.AssemblySeq AND T3.OprSeq = T4.OprSeq
LEFT OUTER JOIN PART_" + Parameters!TableGuid.Value + " T6 ON T1.Company = T6.Company AND T1.PartNum = T6.PartNum LEFT OUTER JOIN ResourceTimeUsed_" + Parameters!TableGuid.Value + " T5
ON T4.Company = T5.Company AND T4.JobNum = T5.JobNum AND T4.AssemblySeq = T5.AssemblySeq AND T4.OprSeq = T5.OprSeq AND T4.OpDtlSeq = T5.OpDtlSeq"

I don’t see where you added the T6 fields to the query this time. I see the join to the part table T6, but I don’t see where you are bringing in any fields from T6 like T6.Nonstock. Is this the whole query?

First line mixed in with T1, does that matter?
This is the full expression for the JobHead Dataset.

Nevermind, I see it now sorry. Are running the report normally to test, or testing in the report builder?

I was just trying in RB, tested in Epicor and this is what I get. The gray box to the right of the PartNum is where I was expecting the output.

Changing the parent and child relation of jobhead and part did the trick. Such a simple oversight on my part. Thanks Adam for the suggestions and 2nd set of eyes on this.

1 Like