cancel
Showing results for 
Search instead for 
Did you mean: 

Record Select - selecting a range of values

Former Member
0 Kudos

I am trying to modify a report which currently is pulling information based on a value for the month (in number format).

So a parameter is used, someone inputs a number and the record select is then set to only pull records of that month. Simple enough.

What I am trying to do now is change it so that the user can select a range, for example "1-12" which will look at all months.

I am having trouble accomplishing this.

I have a few formulas set up so one of them simply gets the range:

shared stringvar startmonth;

shared stringvar endmonth;

If (InStr({?Periods},"-")>0)

THEN

(startmonth:=Split({?Periods},"-",2)[1];

endmonth:=Split({?Periods},"-",2)[2])

Then others which can process them, make a list of all the values in between etc.

Now, I just dont know how to get those values into the record select. I can't declare a shared variable in the formula, and I dont know how else I can pass all the values to it so we can select the right data.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

the parameter is declared in the stored procedure?

if it is in the stored procedure create 1 more and call it beg per

rename the other end per

in the record selection

if in beg per to end per

it should pick up the records in that period

if the parameter is in the report then modify it to select range of values

then use the above formula in the record selection

Former Member
0 Kudos

Doh!

I completely missed the option in the Crystal to allow a range of values on a parameter.......

I was just way overcomplicating things.

Thanks

Former Member
0 Kudos

i tend to look at the harder solution then the simple as well.

Answers (0)