Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Select Records with and/or statements Post Reply Post New Topic
Author Message
jwarren87
Newbie
Newbie


Joined: 17 Jan 2014
Location: United States
Online Status: Offline
Posts: 3
Quote jwarren87 Replybullet Topic: Select Records with and/or statements
    Posted: 05 Mar 2014 at 7:11am
I am trying to select invoice records that are exceptions. For example:

"Invoice_Amount" does not equal "Approved_Amount"   “or”
"Vendor_Number" does not equal "Approved_Vendor_Number"

My syntax within the Details - Select Expert Record formula is this:

{APM_MASTER__INVOICE_PAYMENT.Bank_Account} = {?Bank Account} and
{APM_MASTER__CHECK.Check_Date} = {?Check Date Range} and
{AP_Invoice.Approved_Amount} <> {APM_MASTER__INVOICE_PAYMENT.Amount_Paid} or
{AP_Invoice.Approved_Vendor_Number} <> {APM_MASTER__INVOICE_PAYMENT.Vendor}

Basically the report crashes every time I run it, or returns no data. Not sure if it just overloads the computer or what.

Any ideas as to what could be causing this? Is my syntax right?


Thanks in advance!!!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Mar 2014 at 7:49am
you need to parenth around your 2 OR parts.
Also if your joins are not set you may be getting a cartesian result that is over loading the report
 
{APM_MASTER__INVOICE_PAYMENT.Bank_Account} = {?Bank Account} and
{APM_MASTER__CHECK.Check_Date} = {?Check Date Range} and
(
{AP_Invoice.Approved_Amount} <>
{APM_MASTER__INVOICE_PAYMENT.Amount_Paid} or
{AP_Invoice.Approved_Vendor_Number} <> {APM_MASTER__INVOICE_PAYMENT.Vendor}
)
 
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.014 seconds.