cancel
Showing results for 
Search instead for 
Did you mean: 

PARAMETER IN CRYSTAL REPORT

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

János_at_SAP
Advisor
Advisor
0 Kudos

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

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Is that UDF (U_Employeename) is same as name from OSLP?

Thanks & Regards,

Nagarajan

Former Member
0 Kudos

Yes