Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Multi-Field query Post Reply Post New Topic
Author Message
casjhar
Newbie
Newbie


Joined: 19 May 2008
Location: United States
Online Status: Offline
Posts: 2
Quote casjhar Replybullet Topic: Multi-Field query
     Posted: 19 May 2008 at 9:38am
I am trying to get a report to generate with a range of possible data points entered by the user. The problem is this data can be in one of ten fields and I am only able to return the first field. This is the entry in the selection formula I have used:
 
{bvoucher.bvoucher_plant} in {?Q0} to {?Q2} and
{bvoucher.bvoucher_dept_num} in {?Q1} to {?Q3} and
{bvoucher.bvoucher_take_ded} = 0 and
(
    {bemployee.bemployee_ded_codes_0} in ({?Q4} to {?Q5}) or
    {bemployee.bemployee_ded_codes_1} in ({?Q4} to {?Q5}) or
    {bemployee.bemployee_ded_codes_2} in ({?Q4} to {?Q5}) or
    {bemployee.bemployee_ded_codes_3} in ({?Q4} to {?Q5}) or
    {bemployee.bemployee_ded_codes_4} in ({?Q4} to {?Q5}) or
    {bemployee.bemployee_ded_codes_5} in ({?Q4} to {?Q5}) or
    {bemployee.bemployee_ded_codes_6} in ({?Q4} to {?Q5}) or
    {bemployee.bemployee_ded_codes_7} in ({?Q4} to {?Q5}) or
    {bemployee.bemployee_ded_codes_8} in ({?Q4} to {?Q5}) or
    {bemployee.bemployee_ded_codes_9} in ({?Q4} to {?Q5})
)
 
Please help.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 19 May 2008 at 3:32pm
Your selection formula looks ok.
 
What do you mean by "I am only able to return the first field"?  Do you mean the first record? Are you using a table or a command?
 
-Dell
IP IP Logged
casjhar
Newbie
Newbie


Joined: 19 May 2008
Location: United States
Online Status: Offline
Posts: 2
Quote casjhar Replybullet Posted: 20 May 2008 at 5:41am
What I mean is that if a record has more than one of the parameter in the range, it will only display the record it finds first. For example, if I enter a range of 5 to 6 for Q4 and Q5, and 6 comes first in the list, because these are deductions on an employee record, they can be in any order, ti will only return the information for 6.
IP IP Logged
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