selection - Crystal Reports Record Section not returning same data as sql -


i found solution tech had posted:

new formula:

{product.size} <> “xsm” or isnull({product.size})

unfortunately, when preview report, find doesn’t work. not because of mistake in our logic rather, consider bug in crystal reports. if took exact same condition , applied database records using query analyzer or querying tool, see blank records. unfortunately, crystal not allowing null values come through though our formula says should.

the trick circumventing bug put isnull() check first in formula.

thus, if rearrange condition this:

isnull({product.size}) or {product.size} <> “xsm”

worked charm

________________________________________________-

problem is, if select criteria second or statement ({hiredrate.utransdoc}startswith{?transyn}) , no first ({hiredrate.utransweb}startswith{?webyn}) 1 record meets transyn criteria. if switch places in formula putting ({hiredrate.utransdoc}startswith{?transyn}) 1st of data.

when run sql query of data no matter order in. crystal preview gives me of data on first or section.

the thing stands out looking @ data sql 1 record crystal returning has yes in transdoc field , transweb field blank. other records show yes transdoc , null transweb field.

here crystal record selection formula

{hiredrate.contsupref} startswith {?languagecombo} ,    {hiredrate.ondate} = {?projectdate} ,    {hiredrate.actvcode}= "sig" ,    {hiredrate.resultcode} = "clm" ,    (       {hiredrate.utransweb}startswith{?webyn}  or    {hiredrate.utransdoc}startswith{?transyn} or    {hiredrate.utranlanl0}startswith{?lanloyn} or    {hiredrate.uintconsec}startswith{?interpyn} or    {hiredrate.uintconf}startswith{?intconfyn} or    {hiredrate.uintopi}startswith{?opiyn}       ) 

here sql query crystal using:

select hiredrate.dear, hiredrate.contsupref, hiredrate.lastdate, hiredrate.contact, hiredrate.usourclang, hiredrate.utarglang, hiredrate.utransdoc, hiredrate.utransweb, hiredrate.utranlanl0, hiredrate.uintconsec, hiredrate.uintconf, hiredrate.uintopi, hiredrate.ondate, hiredrate.actvcode, hiredrate.resultcode goldmine_main.dbo.hiredrate hiredrate hiredrate.contsupref 'eng>spa%' , (hiredrate.ondate>={ts '2012-04-01 00:00:00'} , hiredrate.ondate<{ts '2013-04-06 00:00:00'}) , hiredrate.actvcode='sig' , hiredrate.resultcode='clm' , (hiredrate.utransweb 'no%' or hiredrate.utransdoc 'yes%' or hiredrate.utranlanl0 'no%' or hiredrate.uintconsec 'no%' or hiredrate.uintconf 'no%' or hiredrate.uintopi 'no%') order hiredrate.dear, hiredrate.contact 

this happening because {hiredrate.utransweb} null - rest of expression therefore evaluating null in crystal, though (logically) shouldn't.

when first 2 or conditions swapped around, {hiredrate.utransdoc} condition evaluates true , rest of expression short-circuited - why records are selected.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -