Quantcast
Channel: SCN : Unanswered Discussions - Reporting and Printing
Viewing all articles
Browse latest Browse all 776

How can I add Text to this AR query. I want to show notes by BP Account .

$
0
0

I get an error when I add the "Free_Text". to the top row if this query. How can I get the Text  to come on this report. This is the remarks tab from teh BP and I want the note that is saved. When I add it to this below query I get an error when trying to add to the top line where the "Select" is. SELECT CardCode, CardName, PymntGroup, SUM(Balance) BALANCE, SUM(A) FUTURE, SUM(B) '0-30', SUM(C) '31-60', SUM(D) '61-90', SUM(E) '91-120', SUM(F) '121+' FROM ( SELECT T1.CardCode, T1.CardName, T1. [Free_Text] as Notes, T2.[PymntGroup], T0.RefDate, T0.Ref1 'Document_Number',     CASE  WHEN T0.TransType=13 THEN 'Invoice'           WHEN T0.TransType=14 THEN 'Credit Note'           WHEN T0.TransType=30 THEN 'Journal'           WHEN T0.TransType=24 THEN 'Receipt'           END AS 'Document_Type',     T0.DueDate, (T0.Debit- T0.Credit) 'Balance'     ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate, getdate())=0 and DateDiff(day, T0.DueDate,getdate())30 and DateDiff(day, T0.DueDate,getdate())60 and DateDiff(day, T0.DueDate,getdate())90 and DateDiff(day, T0.DueDate,getdate())=121),0) 'F' FROM JDT1 T0 INNER JOIN OCRD T1 ON T0.ShortName = T1.CardCode Left outer join  OCTG T2 On T1.GroupNum = T2.GroupNum WHERE  T1.CardType = 'C' ) T100 GROUP BY CARDCODE, CARDNAME, PymntGroup ORDER BY CARDCODE


Viewing all articles
Browse latest Browse all 776

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>