SAP Business One Query Generator Report Query with Optional Parameter Example

SAP Business One Query Generator Report Query with Optional Parameter

SELECT T0.[DocNum], T0.[DocStatus], T0.[DocDate], T0.[CardCode], T0.[CardName], T1.[ItemCode], T1.[Dscription]
 FROM OPOR T0  INNER JOIN POR1 T1 ON T0.[DocEntry] = T1.[DocEntry]


Where (T0.DocDate=[%0] or [%0]='')