Hi,
Try this first:
SELECT
J0.[TransID],
J1.[ShortName],
C0.[CardName],
J0.[RefDate],
J0.[TransType],
J0.[Ref1],
J1.[LineMemo],
J1.[Debit],
J1.[Credit]
FROM [dbo].[OJDT] J0
JOIN [dbo].[JDT1] J1 ON J1.[TransID] = J0.[TransID]
JOIN [dbo].[OACT] A0 ON J1.[Account] = A0.[AcctCode]
JOIN [dbo].[OCRD] C0 ON C0.[CardCode] = J1.[ShortName]
WHERE
J0.[RefDate] >= '[%0]'
AND J0.[RefDate] <= '[%1]'
AND C0.[CardType] = '[%2]'
Thanks,
Gordon