Skip to Content
0
Aug 03, 2020 at 01:09 AM

SAP B1 Blank Preview from Crystal Reports (DocEntry parameter is set)

95 Views Last edit Aug 03, 2020 at 01:12 AM 2 rev

Hi all,

I have just uploaded my Crystal Reports template to SAP B1 and attempted to run it however I am just getting a blank report. The parameter/record select has been set to {Command.DocEntry} = {?DocKey@}. I am wondering if it has something to do with my query but when I set the record in Crystal it has no issue showing any record information, only when i try and preview it in SAP B1. When i run the query in SAP by itself it has no issues. The query below;

SELECT DISTINCT 
T0.[CardName], 
T0.[DocNum], 
T0.[DocDate], 
T0.[Address], 
T0.[Address2], 
T2.[SlpName], 
T2.[Mobil], 
T2.[Email],
T0.DocEntry,
T1.ItemCode,
T1.Dscription,
T1.Quantity,
T1.Price,
T4.Tel1,
'\\LSA-DB01\Pictures\'+convert(varchar,T3.Picturname),
T4.Cellolar,
T4.E_MailL,
T4.FirstName,
T4.LastName,
T5.PymntGroup,
CAST (T0.[U_LSA_Deposit] AS DECIMAL) AS 'Deposit',
T0.[U_LSA_Period],
T0.Series,
T1.FreeTxt,
T1.VisOrder,
CAST(T3.UserText AS varchar(MAX)) AS ItemInfo,
''
FROM OQUT T0 
INNER JOIN QUT1 T1 ON T0.[DocEntry] = T1.[DocEntry] AND T1.LineType = 'R' 
INNER JOIN OSLP T2 ON T0.SlpCode = T2.SlpCode
INNER JOIN OITM T3 ON T1.[ItemCode] = T3.[ItemCode]
INNER JOIN OCPR T4 ON T0.[CntctCode] = T4.[CntctCode]
INNER JOIN OCTG T5 ON T0.[GroupNum] = T5.[GroupNum]
INNER JOIN QUT10 T6 ON T0.[DocEntry] = T6.[DocEntry]
INNER JOIN OITB T7 ON T3.ItmsGrpCod = T7.ItmsGrpCod
UNION ALL
SELECT DISTINCT 
T0.[CardName], 
T0.[DocNum], 
T0.[DocDate], 
T0.[Address], 
T0.[Address2], 
T2.[SlpName], 
T2.[Mobil], 
T2.[Email],
T0.DocEntry,
'',
'',
0,
0,
T4.Tel1,
'',
T4.Cellolar,
T4.E_MailL,
T4.FirstName,
T4.LastName,
T5.PymntGroup,
CAST (T0.[U_LSA_Deposit] AS DECIMAL) AS 'Deposit',
T0.[U_LSA_Period],
T0.Series,
'',
T1.AftLineNum,
'',
CAST(T1."LineText" AS varchar(MAX)) AS 'LineText'
FROM OQUT T0 
INNER JOIN QUT10 T1 ON T0.[DocEntry] = T1.[DocEntry] AND T1.LineType = 'T' 
INNER JOIN OSLP T2 ON T0.SlpCode = T2.SlpCode
INNER JOIN OCPR T4 ON T0.[CntctCode] = T4.[CntctCode]
INNER JOIN OCTG T5 ON T0.[GroupNum] = T5.[GroupNum]
ORDER BY T0.[DocDate], T0.[DocNum], T1.[VisOrder]

I have a feeling this is one of those super simple things that I have just overlooked, as always any help is greatly appreciated.

Regards,

Nick