on 12-14-2014 2:44 PM
Hi
In the below report placed a parameter the report displays values when report is previewed out side B1 but when report is previewed from sap b1 the
report is showing blank.
The parameter field is for sales employee from oslp table the condition is when clicked for preview it should ask for sales employee name.
select isnull((select slpname from oslp where SlpCode=oinv.slpcode),'No Sales Employee') SalesEmployee ,'Invoice' DocType ,DocDate,DocNum,Numatcard,CardCode,
CardName,DocTotal,PaidToDate,DocTotal-PaidToDate BalanceAmount,Comments from OINV where DocTotal-PaidToDate<>0
and CardCode not like 'O%'
--and Cardcode='C00277'
union all
select isnull( (select slpname from oslp where SlpCode=orin.slpcode),'No Sales Employee') SalesEmployee,'CreditNote' DocType,DocDate,DocNum,Numatcard,CardCode,
CardName,DocTotal,PaidToDate,(DocTotal-PaidToDate)*-1 BalanceAmount,Comments from ORIN where DocTotal-PaidToDate<>0
and CardCode not like 'O%'
--and Cardcode='C00277'
union all
select isnull(U_Employeename,'No Sales Employee') SalesEmployee, 'OnAccount' DocType,RefDate DocDate ,TransId DocNum,'' Numatcard,ShortName cardcode,
(select cardname from OCRD where CardCode=jdt1.shortname) CardName,Debit-Credit DocTotal,
(Debit-Credit)-(BalDueDeb-BalDueCred) PaidToDate ,
BalDueDeb-BalDueCred BalanceAmount,Linememo Comments
from JDT1 where TransType not in ('13','14') and BalDueDeb-BalDueCred<>0
and ShortName in (select cardcode from OCRD where CardType='C')
and ShortName not like 'O%'
--and ShortName='C00277'
Regards,
Karthik B
Hi,
Try to use cast(U_Employeename as nvarchar(30)) instead of U_Employeename in your query,
UDF type in SQL is nvarchar(max) which has limitation in CR,
Thanks,
János
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Is that UDF (U_Employeename) is same as name from OSLP?
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.
User | Count |
---|---|
95 | |
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.