on 04-08-2013 7:24 PM
I want to total this query in each colum that has a total and see credits as credits with a negative sign.. how can I do this?
DECLARE @CardName VARCHAR(100)
SELECT @CardName = T0.CardName FROM (SELECT CardName FROM OCRD) T0 WHERE T0.CardName = '[%0]'
Select T0.cardname as 'Customer',T0.Docdate as 'Month of Service', T0.docnum as 'Invoice Number', T0.[U_AIS_DVIInvName] as 'SF Invoice Name', T0.Taxdate as 'Date Sent',isnull(T0.U_AIS_DVISFSO,T3.U_AIS_DVISFSO) as 'SO#',T0.NumAtCard as 'PO#',
isnull(T0.U_AIS_DVIAdvNm,T3.U_AIS_DVIAdvNm) as 'Advertiser', isnull(T0.U_AIS_DVIOpptyNm,T3.U_AIS_DVIOpptyNm) as 'Campaign',T1.Dscription,T1.Quantity as 'Impressions',T1.Pricebefdi as 'CPM', T1.linetotal as 'Total',
T0.doctotal as 'Invoice Total',(T0.Doctotal-T0.Paidsum) as 'Balance after payment',T0.docstatus, 'Credit' AS TransactionType
from ORIN T0
left outer join RIN1 T1 on T0.docentry = T1.docentry
left outer join RDR1 T2 on T1.Baseentry = T2.docentry and T1.baseline = T2.linenum
left outer join ORDR T3 on T2.docentry = T3.docentry
where T0.[CardName]=@CardName
UNION ALL
Select T0.cardname as 'Customer',T0.Docdate as 'Month of Service', T0.docnum as 'Invoice Number', T0.[U_AIS_DVIInvName] as 'SF Invoice Name', T0.Taxdate as 'Date Sent',isnull(T0.U_AIS_DVISFSO,T3.U_AIS_DVISFSO) as 'SO#',T0.NumAtCard as 'PO#',
isnull(T0.U_AIS_DVIAdvNm,T3.U_AIS_DVIAdvNm) as 'Advertiser', isnull(T0.U_AIS_DVIOpptyNm,T3.U_AIS_DVIOpptyNm) as 'Campaign',T1.Dscription,T1.Quantity as 'Impressions',T1.Pricebefdi as 'CPM', T1.linetotal as 'Total',
T0.doctotal as 'Invoice Total',(T0.Doctotal-T0.Paidsum) as 'Balance after payment',T0.docstatus, 'Invoice' AS TransactionType
from OINV T0
left outer join INV1 T1 on T0.docentry = T1.docentry
left outer join RDR1 T2 on T1.Baseentry = T2.docentry and T1.baseline = T2.linenum
left outer join ORDR T3 on T2.docentry = T3.docentry
where T0.[CardName]=@CardName
Hi,
Please close this thread if you got the answer by clicking correct/helpful answer.
Thanks & Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you got answer, please close the thread by marking helpful/correct answers.
Thanks & Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you I get it now.. Control at the same time you are clicking on the field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not sure what you mean by ctrl+ click.. I run the report and see it on the screen now how do I see the total?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think I answered my own question regarding the - sign. It only goes on the credits and I was entering it on both the invoices and credits. Second.. So now all I need to know is how to total the column. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you all.. the question I have is how can I total the column on a query.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Danielle,
It is not Possible to make the Values Bold or any other Formar in the Query.If you Want to Make the Letters as Bold Use Reporting Tools like,
1.Query Print Layout Designer
2.Crystal Reports
3.XL Reporter
Hope Helpful,
Vamsi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Danielle Napoli...
For - sign add - before the field name...
In Query Pld you can use the Bold Option for the Total by default in query it is not Possible..
After you have completed your changes to the layout and have saved your work, you can see the actual printed document by accessing the Query Manager, highlighting your report name, and clicking the print preview icon at the top of the screen.
Hope Helpful
Regards
Kennedy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.