Skip to Content

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

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Aug 03, 2020 at 01:20 AM

    Ok i solved this one as soon as i posted it -_-

    For anyone else in the future with this problem, i just removed the "INNER JOIN QUT10 T6 ON T0.[DocEntry]= T6.[DocEntry]" from the top query that shouldn't have been there since it was unioned in the second.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.