Hi, this is my first post. I used to use Crystal back in the '90s and early 00's, but I'm getting back into it again in the last month or so. It's much better now!
I'm getting done what I need to, but I ran across a couple of wierdnesses I'd like to get explained if possible. I have a report that included this formula:
if (instr({i_mst.descr}, "C-2") > 0 Or instr({i_mst.descr-2}, "C-2") > 0 or
instr({i_mst.descr}, "C-3") > 0 Or instr({i_mst.descr-2}, "C-3") > 0 or
instr({i_mst.descr}, "C-4") > 0 Or instr({i_mst.descr-2}, "C-4") > 0 or
instr({i_mst.descr}, "C-5") > 0 Or instr({i_mst.descr-2}, "C-5") > 0)
then Control := "***Control***";
Unfortunately, "C-n" was also used for sutures, so they came out on the report looking like controlled substances. I changed the formula to this
if (instr({i_mst.descr}, "C-2") > 0 Or instr({i_mst.descr-2}, "C-2") > 0 or
instr({i_mst.descr}, "C-3") > 0 Or instr({i_mst.descr-2}, "C-3") > 0 or
instr({i_mst.descr}, "C-4") > 0 Or instr({i_mst.descr-2}, "C-4") > 0 or
instr({i_mst.descr}, "C-5") > 0 Or instr({i_mst.descr-2}, "C-5") > 0) and
(instr({c_shipto.ship#}, "DEA") > 0 or instr({c_shipto.ship#}, "DE1") > 0)
then Control := "***Control***";
but I found that Crystal was dropping records from my control table while producing the report, so I changed it to look for "SUTURE" in the description and all is well.
My question is, why would using a field from another table (one that I was already using in the report) cause me to lose records from the table I'm keying off of? This is a Progress database going through their ODBC SQL-92 driver.
Thanks in advance for any insight I can get here.