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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group Selection Formula using Parameters ??

Status
Not open for further replies.

ajacode

Technical User
Aug 21, 2002
66
US
I am trying to limit a Group to show records with a sum which falls within a range. The range is part of the stored procedure and filled in by the users but I keep getting an error message stating

"A number or Currency Amount is Required HERE"

Right Before the Parameter {?@AmtRangeFrom}

Here's the full formula:

Sum ({up_rpt_P_POsOverSpecAmt.VoucherAmt}, {up_rpt_P_POsOverSpecAmt.PurchaseOrderID}) >= {?@AmtRangeFrom} AND Sum ({up_rpt_P_POsOverSpecAmt.VoucherAmt}, {up_rpt_P_POsOverSpecAmt.PurchaseOrderID}) <= {?@AmtRangeTo}

Is this not possible to refer to parameters ?

Thanks Beforehand

AJ
 
Sounds like it's a string parm, try:

Sum ({up_rpt_P_POsOverSpecAmt.VoucherAmt}, {up_rpt_P_POsOverSpecAmt.PurchaseOrderID}) >= val({?@AmtRangeFrom}) AND Sum ({up_rpt_P_POsOverSpecAmt.VoucherAmt}, {up_rpt_P_POsOverSpecAmt.PurchaseOrderID}) <= val({?@AmtRangeTo})

You can test this by trying to enter alpha chars in the parm.

I haven't attempted what you're doing, I would change the Stored Procedure to filter this.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top