Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 2169

Getting subtotal in query used with alert function

$
0
0

Hi,

 

I've done this query and it is being used with the alert function to send out an e-mail everyday. I've learned that to get a subtotal you need to ctrl+click but is there no other way to get a subtotal to show in the result? Because ctrl+click is not possible when the report has been sent as an e-mail and often my colleagues read their e-mail on their phones.

 

I would only need a subtotal of the linetotal.

Also, I seem to be getting the right result, but is my date selection correct? The result should only show the previous days sales orders.

 

 

SELECT T0.[DocDate], T0.[DocNum], T0.[CardCode], T0.[CardName], SUM(T1.[LineTotal]) AS 'Totalt ex moms' FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.[DocEntry] = T1.[DocEntry] WHERE T0.[DocDate] >= getdate()-2 AND  T0.[DocDate] <=  getdate()-1 GROUP BY T0.[DocDate], T0.[DocNum], T0.[CardCode], T0.[CardName]


Viewing all articles
Browse latest Browse all 2169

Trending Articles



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