Skip to Content
0
Former Member
Sep 18, 2014 at 06:36 PM

Use of DocKey@ in Crystal Reports

114 Views

Hello Crystal Reports Experts;

I created a Crystal Report that uses a Command as follows:

SELECT T0.DocNum AS 'Sales Order Number'

-- , T0.DocEntry

-- , T1.DocEntry

-- , T2.BaseEntry

-- , T2.DocEntry

-- , T3.DocEntry

-- , T0.CardCode -- , T0.CardName

, T1.ItemCode AS 'Item Code'

-- , T2.ItemCode

, T1.Dscription AS 'Description' , T1.Quantity AS 'Order Quantity'

, T3.ShipToCode AS 'Customer' , T3.Address2 AS 'Shipment Address'

, T2.ShipDate , T3.DocNum AS 'Delivery Number' , T3.TrackNo AS 'Tracking Number' , T3.U_NPH_ShipmentETA AS 'Shipment ETA' , T2.Quantity AS 'Shipment Quantity' FROM ORDR T0 LEFT JOIN RDR1 T1 ON T1.DocEntry = T0.DocEntry LEFT JOIN DLN1 T2 ON T2.BaseEntry = T1.DocEntry AND T2.ItemCode = T1.ItemCode LEFT JOIN ODLN T3 ON T3.DocEntry = T2.DocEntry

WHERE T0.DocNum = {?DocKey@}

ORDER BY T0.CardCode, T3.Address2

The Crystal Reports version is 2008 and this particular report is imported into SAP Business One v8.82 as a layout with a document type of RDR2 -Order (Items).

When executed in Sales A/R ==> Sales Order ==> Preview Layouts, the report shows but has no data on it. Kindly advice what is wrong with this.

Thank you very much in Advance.

Warm Regards,

Noel