Skip to Content
author's profile photo Former Member
Former Member

PARAMETER IN CRYSTAL REPORT

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Dec 16, 2014 at 07:30 AM

    Hi,

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

    Thanks & Regards,

    Nagarajan

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 16, 2014 at 03:27 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.