Skip to Content
0

How to add non-mandatory parameters

Dec 07, 2017 at 03:31 PM

21

avatar image

Hi experts,

I have a query which is created in Crystal Reports. This query has parameters. Parameters are mandatory to fill. We would like to non-mandatory these parameters. Is it possible?

SELECT T1."Levels", T1."FatherNum", T1."AcctCode", T1."ActType", T1."ActCurr", T1."Postable",T2."OcrCode2",T2."ProfitCode",T2."OcrCode3",

IFNULL(SUM(T2."SYSDeb"),(SELECT SUM(S2."SYSDeb") FROM OACT S1 INNER JOIN JDT1 S2 ON S1."AcctCode" = S2."Account"

WHERE S2."Account" LIKE T1."AcctCode"|| '%' AND S2."TransType"<>'-3' )) "SYSBorc",

IFNULL(SUM(T2."Debit"),(SELECT SUM(S2."Debit") FROM OACT S1 INNER JOIN JDT1 S2 ON S1."AcctCode" = S2."Account" WHERE S2."Account" LIKE T1."AcctCode"|| '%' AND S2."TransType"<>'-3' AND S2."RefDate" BETWEEN {?@DateStrr} AND {?@DateSON} )) "Borc",

IFNULL(SUM(T2."Credit"),(SELECT SUM(S2."Credit") FROM OACT S1 INNER JOIN JDT1 S2 ON S1."AcctCode" = S2."Account" WHERE S2."Account" LIKE T1."AcctCode"|| '%' AND S2."TransType"<>'-3' AND S2."RefDate" BETWEEN {?@DateStrr} AND {?@DateSON})) "Alacak",

IFNULL(SUM(T2."SYSCred"),(SELECT SUM(S2."SYSCred") FROM OACT S1 INNER JOIN JDT1 S2 ON S1."AcctCode" = S2."Account"

WHERE S2."Account" LIKE T1."AcctCode"|| '%' AND S2."TransType"<>'-3' )) "SYSAlacak",

(IFNULL(SUM(T2."Debit"),(SELECT SUM(S2."Debit") FROM OACT S1 INNER JOIN JDT1 S2 ON S1."AcctCode" = S2."Account" WHERE S2."Account" LIKE T1."AcctCode"|| '%' AND S2."TransType"<>'-3' AND S2."RefDate" BETWEEN {?@DateStrr} AND {?@DateSON} )) ) - (IFNULL(SUM(T2."Credit"),(SELECT SUM(S2."Credit") FROM OACT S1 INNER JOIN JDT1 S2 ON S1."AcctCode" = S2."Account" WHERE S2."Account" LIKE T1."AcctCode"|| '%' AND S2."TransType"<>'-3' AND S2."RefDate" BETWEEN {?@DateStrr} AND {?@DateSON})) ) "Bakiye",

T1."AcctName"

FROM OACT T1

LEFT OUTER JOIN JDT1 T2 ON T1."AcctCode" = T2."Account" AND T2."RefDate" BETWEEN {?@DateStrr} AND {?@DateSON}

LEFT OUTER JOIN OJDT T3 ON T2."TransId" = T3."TransId"

GROUP BY T1."Levels", T1."FatherNum", T1."AcctCode",T1."AcctName", T1."ActType", T1."ActCurr", T1."Postable",T2."OcrCode2",T2."ProfitCode", T2."OcrCode3"

ORDER BY T1."AcctCode", T1."FatherNum", T1."Levels", T1."ActType", T1."ActCurr",T2."OcrCode2",T2."ProfitCode", T2."OcrCode3"

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers