Connecting Tech Pros Worldwide Forums | Help | Site Map

Error in Crystal Report Formula: "A number is Required Here"

Newbie
 
Join Date: Sep 2006
Posts: 22
#1: Aug 13 '07
Crystal Report for Visual Studio.NET 2003.

I have a formula that brings an error " .. A number is required here ... ". See the code snippet below which i have simplified. In the actual formula, the function NthLargest is being accessed in a loop hence the need to have the first parameter being a variable (pos):

Expand|Select|Wrap|Line Numbers
  1. numberVar pos := 1;
  2. NthLargest (pos, {Table1.score}); 
This will throw an error " .. A number is required here ... ". If i replace variable pos in the function with a literal like 1, it works. I also realize the same problem for other functions like PthPercentile, NthMostFrequent etc. The problem is also there in Crystal Report 8.
Question is, how do i go through a loop where the N variable is changing after each iteration in the NthLargest function ?
NB: The field score in Table1 is a Long Integer (Database = Access).

Reply