Converting nvarchar

Working on Receipt entry in report in SSRS and need to add the FAI_Required_c field. I added but am getting the following error.

That field has the value ‘3501-122-2’ in it, which is certainly not boolean.

Understood but I’m not sure what needs to be done to get this to work.

We can’t tell you what to do based on the limited info provided, but we can provide guidance.

The error is showing that you are trying to do a bit-wise operation (like check for true/false) or display that field as a checkbox - which might be what you are trying to do. It seems that your custom field has nvarchar data in it instead of the binary/bit data of true/false (0/1). Clean up the data and it should correct this error.

I’ve gone back and created a BAQ. I’m pulling the FAI_Required_c field from the PART Table. I’ve created a relationship from the PARTTRAN Table to the PART table.

My issue now is “Invalid Colum Name”

Am I missing something in here.

=“SELECT PT.Part_Required_FAI_c,JH.Equip_Model,JH.Equip_Description,JH.Equip_SerialNum,RD.POLine_MfgPartNum,RD.POLine_VenPartNum,ROW_NUMBER() OVER (ORDER BY SN.SerialNumber) AS ID,SN.SerialNumber,RD.PONum_CommentText,RD.POLine_CommentText,RD.PackSlip_ReceiptComment,T1.RevisionNum,T1.ActTranQty,T1.AsOfDate,T1.AssemblySeq,T1.AssetNum,T1.BurUnitCost,T1.Calc_DocNum,T1.Calc_InvoiceNum,T1.Calc_LineNum,T1.Calc_PrintedBy,T1.Calc_SNList,T1.Calc_VendorAddrList,T1.Calc_VendorID,T1.Calc_WareHouseDesc,T1.Company,T1.EmpID,T1.ExtCost,T1.InvAdjReason,T1.JobNum2,T1.JobSeq2,T1.LotNum2,T1.OrderLine,T1.OrderNum,T1.PackLine,T1.PackNum,T1.PackSlip,T1.PBInvNum,T1.PORelNum,T1.POUnitCost,T1.ProjProcessed,T1.SubUnitCost,T1.SysDate,T1.SysTime,T1.TranDocTypeID,T1.TranNum,T1.TranQty,T1.WareHouse2,T1.AdditionNum,T1.AsOfSeq,T1.AssemblySeq2,T1.BinNum,T1.BinNum2,T1.BinType,T1.Calc_Bin2Description,T1.Calc_BinDescription,T1.Calc_EntryPerson,T1.Calc_InvoiceDate,T1.Calc_ReasonDescription,T1.Calc_WareHouse2Desc,T1.Calc_Weight,T1.DisposalNum,T1.EntryPerson,T1.InvAdjSrc,T1.JobNum,T1.JobSeq,T1.LbrUnitCost,T1.LegalNumber,T1.LoanFlag,T1.LotNum,T1.MscNum,T1.MtlUnitCost,T1.OrderRelNum,T1.PartDescription,T1.PartNum,T1.Plant,T1.Plant2,T1.POLine,T1.PONum,T1.POReceiptQty,T1.PurPoint,T1.TranDate,T1.TranReference,T1.TranType,T1.UM,T1.WareHouseCode,T1.RptLanguageID,T1.MtlBurUnitCost,T1.PCID
FROM PartTran_” + Parameters!TableGuid.Value + " T1 LEFT OUTER JOIN RcvDtl_" + Parameters!TableGuid.Value + " RD ON T1.Company = RD.Company AND T1.PackSlip = RD.PackSlip AND T1.PackLine = RD.PackLine LEFT OUTER JOIN SERIALNO_" + Parameters!TableGuid.Value + " SN ON T1.Company = SN.Company AND T1.PackSlip = SN.PackSlip AND T1.PackLine = SN.PackSlipLine AND T1.PartNum = SN.PartNum AND T1.LotNum = SN.LotNum LEFT OUTER JOIN JOBHEAD_" + Parameters!TableGuid.Value + " JH ON T1.Company = JH.Company AND T1.JobNum = JH.JobNum LEFT OUTER JOIN Part_" + Parameters!TableGuid.Value + " PT ON T1.Company = PT.Company AND T1.PackSlip = PT.PackSlip"

Do you have both FAI_Required_c and Required_FAI_c in Part?

It’d help if I provided the error.


So you probably add incorrect one?
SQL wants Required_FAI_c and PackSlip. You mentioned in the first message another name FAI_Required_c

You have two different kinds of double quotes in there. Make sure to convert them all to the correct style. This can happen when using copy/paste from browsers.

@Olga Good Catch! Running the report again to see if it’ll work.

Still getting same error.

much easier to debug actual code than a pic. Please use three backticks ` for code to debug

<<Three backticks followed by enter 
Code here
Three more backticks preceeded by enter >>>

Based on this error you may have the correct column name in the SQL query being sent from SSRS, but do you have columns correctly added to the dataset(s)?

Are you sure the columns (Packslip, Part_FAI_Required_c) are both attached to the Part table?

When I created a BAQ I was able to test the data and get the results I needed. I added PART to PARTTRAN.