cancel
Showing results for 
Search instead for 
Did you mean: 

passing a value in report

Former Member
0 Kudos

i have a stored procedure for the data set, this is my issue

i have debits and payments stored in one table, they only way to retrieve both types is to select either the voucher key or the receipt key. this is my sql where statement

WHERE

(Pr_Voucher_Status_1."Voucher_number" = '66977' OR

Pr_Voucher_Status_1."po_recpt_key" = '66977')

i dont want to pass a specific value. i would like it to retrieve all records is the voucher is = to the po.

i can retrieve the data if i use an or statement IF PARAMETER = FIELD THEN TRUE in the select expert and pass a paramter value through. I dont want to use either field for a parameter value, what i need to do is some how say in the stored procedure or a crystal selection to retreive all records.

i thought about passing an array, but cant use the formula in

the record selection.

i hope this is clear and someone can help. im stumped

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Sharon,

is the number stored in the database? I'm not clear on that part.

Rob

Former Member
0 Kudos

yes it is stored in 2 fields. voucher key and po recipt key.

it gets stored when there is a debit paid against the voucher, then the voucher key gets stored in the po reciept key.

Former Member
0 Kudos

Sharon,

I after rereading it a few times I think I understand it.

How about using this as the select statement:

(voucher > 0 or

po > 0)

Former Member
0 Kudos

Hi Sharon

You said you have both fields in one table. Please do the following ::

--Write a SQL , use the table as alias i.e.

Select a.Voucher_Number, b.Po_recpt_Key from Pr_Voucher_Status_1 a , Pr_Voucher_Status_1 b where a. Voucher_number = b.Po_recept_key

--Now try to pull the data in crystal reports

Thanks

Sastry