Showing results for 
Search instead for 
Did you mean: 

Sales,Purchase Report

Former Member
0 Kudos

Respected sir,

I have an issue,one of my enduser what he wants is, In Sale Analysis "Delivery Notes" option is selected when we click OK obviously all data will display as Customer code,customer name,Grossprofit etc.But my client also wants Qty,Payments Terms,Pending Terms etc Like any other extra details.Please help me out.Is there any coding is required or I need to go for Form Settings.I also tried the from settings but i didnt found any answer.Please Help Me out.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Maithili,

Try this...

Add additional field in this query....

SELECT T0.ItemCode, 
Max(IsNull(T0.OnHand,0)) 'In Stock', 
SUM(IsNull(T1.Quantity,0)) 'Quantity', 
Sum(IsNull(T1.LineTotal,0)) 'Sales Amt', 
SUM(IsNull(T1.GrssProfit,0)) 'Gross Profit', 
Case WHEN Sum(Isnull(T1.LineTotal,0)) = 0 THEN 0 ELSE 
SUM(IsNUll(T1.GrssProfit,0))/Sum(Isnull(T1.LineTotal,0)) * 100 END 'Gross Profit %'
LEFT JOIN dbo.INV1 T1 ON T1.ItemCode=T0.ItemCode
LEFT JOIN dbo.OINV T2 ON T2.DocEntry=T1.DocEntry AND T2.DocDate Between [%0] AND [%1]
GROUP BY T0.ItemCode

Try other link...


Srujal Patel

Former Member
0 Kudos

Thank You Mr. Srujal Patel.Thanks alot.