cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal report related problem

former_member269992
Participant
0 Kudos

Hello All,

SELECT TOP (100) PERCENT T0.CardCode, T0.CardName, T0.Address, T3.Name, T0.DocDate, T0.DocNum, T0.VatSumFC, T0.U_Suffix, T2.Phone1, T2.Phone2,
                  T2.Fax, T4.PymntGroup, T1.Dscription, T1.ItemCode, T1.Quantity, T1.OpenQty, T1.Price, T1.Currency, T1.LineTotal, T1.TotalFrgn, T1.U_Text_Rate,
                  T1.Quantity as U_Order_Qty, T1.OpenQty as U_Order_OpenQty, T6.InvntryUom,  T1.U_Order_UoM, T1.Price as U_List_Price, 1 as U_ConvFactor, T1.U_OB_MANU, T1.U_OB_MANUPART, T1.FreeTxt,
                  T5.SlpName, T5.Memo, T0.U_RequestedBy, T0.U_Note1, T0.SlpCode, T0.U_Note2, T0.U_Remarks1, T0.U_Remarks2, T0.U_Remarks3,
                  T0.U_Remarks4, T0.U_Remarks5, T0.U_Remarks6, T0.U_Remarks7, T0.U_Remarks8, T0.U_Remarks9, T0.U_Remarks10, T0.U_Remarks11,
                  T0.U_Remarks12, T0.U_Remarks13, T0.U_Remarks14, T0.U_Remarks15, T0.U_Remarks16, T0.VatSum, T0.DocDueDate, T1.LinManClsd, T0.DiscPrcnt,
                  T0.DiscSum, T0.DiscSumFC, T6.SWW, SUM(T7.Quantity) AS RecdOrdrQty, SUM(T7.Quantity) AS RecdQty, T1.LineNum, T1.VisOrder
FROM     dbo.OPOR AS T0 INNER JOIN
                  dbo.POR1 AS T1 ON T0.DocEntry = T1.DocEntry INNER JOIN
                  dbo.OCRD AS T2 ON T0.CardCode = T2.CardCode INNER JOIN
                  dbo.OCPR AS T3 ON T0.CntctCode = T3.CntctCode INNER JOIN
                  dbo.OCTG AS T4 ON T0.GroupNum = T4.GroupNum INNER JOIN
                  dbo.OSLP AS T5 ON T0.SlpCode = T5.SlpCode INNER JOIN
                  dbo.OITM AS T6 ON T1.ItemCode = T6.ItemCode LEFT OUTER JOIN
                  dbo.PDN1 AS T7 ON T1.DocEntry = T7.BaseEntry AND T1.LineNum = T7.BaseLine

Where

    T0.DocEntry = {?Dockey@}

GROUP BY T0.CardCode, T0.CardName, T0.Address, T3.Name, T0.DocDate, T0.DocNum, T0.VatSumFC, T0.U_Suffix, T2.Phone1, T2.Phone2, T2.Fax,

                  T4.PymntGroup, T1.Dscription, T1.ItemCode, T1.Quantity, T1.OpenQty, T1.Price, T1.Currency, T1.LineTotal, T1.TotalFrgn, T1.U_Text_Rate,
                  T1.Quantity, T1.OpenQty, T6.InvntryUom, T1.U_Order_UoM, T1.Price, T1.U_OB_MANU, T1.U_OB_MANUPART, T1.FreeTxt,
                  T5.SlpName, T5.Memo, T0.U_RequestedBy, T0.U_Note1, T0.SlpCode, T0.U_Note2, T0.U_Remarks1, T0.U_Remarks2, T0.U_Remarks3,
                  T0.U_Remarks4, T0.U_Remarks5, T0.U_Remarks6, T0.U_Remarks7, T0.U_Remarks8, T0.U_Remarks9, T0.U_Remarks10, T0.U_Remarks11,
                  T0.U_Remarks12, T0.U_Remarks13, T0.U_Remarks14, T0.U_Remarks15, T0.U_Remarks16, T0.VatSum, T0.DocDueDate, T1.LinManClsd, T0.DiscPrcnt,
                  T0.DiscSum, T0.DiscSumFC, T6.SWW, T1.LineNum, T1.VisOrder

ORDER BY T1.VisOrder

I have wrote above query in crystal reports. Its working fine

But i am not able to see the Print Preview only for 2 business partners.

Can anyone check this query and help me to find out the issue.

Regards,

Hitul

View Entire Topic
Former Member
0 Kudos

HI , 

This conditions may be problem for that particular BP , 

dbo.OCPR AS T3 ON T0.CntctCode = T3.CntctCode INNER JOIN  

dbo.OCTG AS T4 ON T0.GroupNum = T4.GroupNum INNER JOIN  

you can Change LEFT JOIN instead of INNER JOIN and then check the result.

-Rajesh N

former_member269992
Participant
0 Kudos

Hello Rajesh,

Using LEFT JOIN, it worked fine.

Thank you so much.

Regards,

Hitul