Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameters ignored by Crystal 2

Status
Not open for further replies.

WTKnow

Programmer
Aug 3, 2006
29
US
I have noticed this problem before but I was fixing it non-professionaly as i think.
I am using views to build my Reports.
Sometimes few Reports will use same view so i do not apply filters to views, I am trying to apply filters in RecordSelection section.
What I have noticed sometimes those filters will be ignored by Crystal.
Like now i have
{t.CUSTOMER_ID}={?ID_NO} OR
{t.CUSTOMER_ID}={?Cus_NO}and
{t.SUB_ID} = 0 and
{t.DCODE}='CON' and
{t.SUBCODE}='MAINT'
so last 3 lines will be ignored...
When I have Report with ONLY those 3 lines it works fine.

Can you see why? I can't.
Thanks so much

*************************************
Crystal version 9.2
Database/connectivity used SQL Server
 
The issue is that you are not setting off your "or" statement with parentheses. Try:

(
{t.CUSTOMER_ID}={?ID_NO} OR
{t.CUSTOMER_ID}={?Cus_NO}
) and
{t.SUB_ID} = 0 and
{t.DCODE}='CON' and
{t.SUBCODE}='MAINT'

Even I am not sure this is what you intend. The above is correct if you want or the other ID AND all three following clauses to be true.

-LB
 
You are perfectly correct!
I am often using first 2 lines in formula that set to True...
Thanks so much

*************************************
Crystal version 9.2
Database/connectivity used SQL Server
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top