Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Data Connectivity
Message Icon Topic: One table has no matching records Post Reply Post New Topic
Author Message
SWOhioJeepDude
Newbie
Newbie
Avatar

Joined: 11 Jun 2009
Location: United States
Online Status: Offline
Posts: 3
Quote SWOhioJeepDude Replybullet Topic: One table has no matching records
    Posted: 11 Jun 2009 at 10:49am
I've been searching everywhere to an answer or lead to the problem I am dealing with...
 
I'm requesting a report to return a dollar amount and any text that might be associated with that amount.  If there is no text, assign some generic text to the field.
 
two tables, TEXT and PACKING
both have a field called co-num which is the record selection criteria
example -  co-num=1150100
the PACKING table always contains the co-num but the TEXT table only has the co-num if the user has entered text for that specific amount, otherwise no record exists, but yet I still need to check to see if it there.
 
I have a formula field with this...
 
if {text.txt} = "" and {packing.freight} < 0 then
"          LESS FREIGHT ALLOWANCE"
else
if {text.txt} = "" and {packing.freight} > 0 then
"          PLUS FREIGHT CHARGES"
else
{text.txt}
 
How do I make a call to check if the record does not exist and still run my code?
IP IP Logged
SWOhioJeepDude
Newbie
Newbie
Avatar

Joined: 11 Jun 2009
Location: United States
Online Status: Offline
Posts: 3
Quote SWOhioJeepDude Replybullet Posted: 11 Jun 2009 at 11:44am
Update to issue above, changed my code to this...
 
booleanVar nullcheck;
nullcheck = isnull({text.txt});
if nullcheck = False then
    if {text.txt} = "" and {packing.freight} < 0 then
        "          LESS FREIGHT ALLOWANCE"
    else
        if {text.txt} = "" and {packing.freight} > 0 then
            "          PLUS FREIGHT CHARGES"
        else
            {text.txt}
else
    if {packing.freight} < 0 then
        "          LESS FREIGHT ALLOWANCE"
    else
        if {packing.freight} > 0 then
            "          PLUS FREIGHT CHARGES"
 
Also, I am doing a left join to the text table from the packing table.
 
Still no success on running this code.


Edited by SWOhioJeepDude - 11 Jun 2009 at 11:45am
IP IP Logged
SWOhioJeepDude
Newbie
Newbie
Avatar

Joined: 11 Jun 2009
Location: United States
Online Status: Offline
Posts: 3
Quote SWOhioJeepDude Replybullet Posted: 12 Jun 2009 at 9:26am
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.