Hello,
I'm running Crystal v8.5.
This is my Crystal record selection formula:
{Table_1.RECTYPE} = "H" and
{Table_1.ACCOUNTNO} = "PRODUCTS" and
{TABLE.EXT} = ToText (Year (CurrentDate)) and
{TABLE.CONTACT} = "W magazynie" and
Left ({TABLE.CONTSUPREF},7 ) = {Table_1.CONTACT} and
{Table_1.PHONE} = "kg" and
(
select {?Firma}[1]
case "<STORES>" : {KONTAKTY.KEY5} = "Store"
case "<ALL>" : {KONTAKTY.COMPANY} like "*"
default: {KONTAKTY.COMPANY} = {?Company}
) )
This is SQL from Crystal | Database | Show SQL Query:
(after parameters choosing)
SELECT
Table_1."ACCOUNTNO", Table_1."RECTYPE", (...etc...)
FROM
{ oj ("Baza"."dbo"."TABLE" Table_1 INNER JOIN
"Baza"."dbo"."TABLE" TABLE ON
Table_1."CONTSUPREF" = TABLE."ADDRESS2")
INNER JOIN "Baza"."dbo"."KONTAKTY" KONTAKTY ON
TABLE."ACCOUNTNO" = KONTAKTY."ACCOUNTNO"}
WHERE
Table_1."RECTYPE" = 'H' AND
Table_1."ACCOUNTNO" = 'PRODUCTS' AND
TABLE."EXT" = '2005' AND
TABLE."CONTACT" = 'W magazynie' AND
Table_1."PHONE" = 'kg'
As You can see, there is no
„Left ({TABLE.CONTSUPREF},7 ) = {Table_1.CONTACT}”
condition and last „select” condition in SQL Query.
Two conditions are missing! Could somebody explain me this situation ?
What should I check?
Thank You very much in advance!
Wawrzyniec Chroscicki
I'm running Crystal v8.5.
This is my Crystal record selection formula:
{Table_1.RECTYPE} = "H" and
{Table_1.ACCOUNTNO} = "PRODUCTS" and
{TABLE.EXT} = ToText (Year (CurrentDate)) and
{TABLE.CONTACT} = "W magazynie" and
Left ({TABLE.CONTSUPREF},7 ) = {Table_1.CONTACT} and
{Table_1.PHONE} = "kg" and
(
select {?Firma}[1]
case "<STORES>" : {KONTAKTY.KEY5} = "Store"
case "<ALL>" : {KONTAKTY.COMPANY} like "*"
default: {KONTAKTY.COMPANY} = {?Company}
) )
This is SQL from Crystal | Database | Show SQL Query:
(after parameters choosing)
SELECT
Table_1."ACCOUNTNO", Table_1."RECTYPE", (...etc...)
FROM
{ oj ("Baza"."dbo"."TABLE" Table_1 INNER JOIN
"Baza"."dbo"."TABLE" TABLE ON
Table_1."CONTSUPREF" = TABLE."ADDRESS2")
INNER JOIN "Baza"."dbo"."KONTAKTY" KONTAKTY ON
TABLE."ACCOUNTNO" = KONTAKTY."ACCOUNTNO"}
WHERE
Table_1."RECTYPE" = 'H' AND
Table_1."ACCOUNTNO" = 'PRODUCTS' AND
TABLE."EXT" = '2005' AND
TABLE."CONTACT" = 'W magazynie' AND
Table_1."PHONE" = 'kg'
As You can see, there is no
„Left ({TABLE.CONTSUPREF},7 ) = {Table_1.CONTACT}”
condition and last „select” condition in SQL Query.
Two conditions are missing! Could somebody explain me this situation ?
What should I check?
Thank You very much in advance!
Wawrzyniec Chroscicki