FMabey
asked on
Crystal Reports Range Parameter
Hi all,
I have a report (written in Crystal 9) whereby the user enters 2 numerical parameter range values. For example the user enters Value1 = 1 and Value2 = 5.
I then want my report to display 5 details, one for each value between and including the range values. So this would show 5 detail values 1,2,3,4 and 5.
How do I do this?
Thanks in advance
I have a report (written in Crystal 9) whereby the user enters 2 numerical parameter range values. For example the user enters Value1 = 1 and Value2 = 5.
I then want my report to display 5 details, one for each value between and including the range values. So this would show 5 detail values 1,2,3,4 and 5.
How do I do this?
Thanks in advance
ASKER
Hi James,
Thanks for your reply.
I am using a single parameter which I have set to type number and has range value(s) checked. The user is then presented with two boxes 'start of range' and 'end of range'
Unfortunately, none of the values defined in the parameters exist in my data! Essentially, my data will return only one row, a part ID. We print out a set of pre-defined trace numbers (my parameter values). So if we want 5 of these parts, the user will enter the next set of available trace numbers, so that may be 6 to 10 for example.
I then want the detail multiplied 5 times to show the part ID on each detail, along with the next value in the range.
So...
PartID = P16
Range = 6 to 10
Output...
PartID: P16
TraceID: 6
PartID: P16
TraceID: 7
PartID: P16
TraceID: 8
PartID: P16
TraceID: 9
PartID: P16
TraceID:10
Thanks for your reply.
I am using a single parameter which I have set to type number and has range value(s) checked. The user is then presented with two boxes 'start of range' and 'end of range'
Unfortunately, none of the values defined in the parameters exist in my data! Essentially, my data will return only one row, a part ID. We print out a set of pre-defined trace numbers (my parameter values). So if we want 5 of these parts, the user will enter the next set of available trace numbers, so that may be 6 to 10 for example.
I then want the detail multiplied 5 times to show the part ID on each detail, along with the next value in the range.
So...
PartID = P16
Range = 6 to 10
Output...
PartID: P16
TraceID: 6
PartID: P16
TraceID: 7
PartID: P16
TraceID: 8
PartID: P16
TraceID: 9
PartID: P16
TraceID:10
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your help guys.
James, you pushed me in the right direction and mlmcc, thanks for the suggestion of an unlinked table... Works a treat.
Thanks
James, you pushed me in the right direction and mlmcc, thanks for the suggestion of an unlinked table... Works a treat.
Thanks
Thanks, mlmcc. I thought about a cross-join, but I wasn't sure it would work, and thought it might be really inefficient even if it did. I've never needed one, so I really didn't know.
And you're welcome, FMabey.
James
And you're welcome, FMabey.
James
It could be inefficient but it is probably since the report is probably only getting 1 record it won't be noticed.
mlmcc
mlmcc
If it does, it should be simple.
If it does not, you can try to get the report to show something for any missing data. Whether or not that will work may depend on how complex your report and data are.
As far as the range goes ...
Are you actually using a range parameter (a single parameter that allows a range of values), or two separate parameters (one with the minimum value and one with the maximum)?
If it's a range parameter, you can go to the record selection formula and enter a test like:
{your field} = {?range parameter}
CR will understand that the parameter is a range and include every value in the range.
If you have two separate parameters, the test would be something like:
{your field} >= {?start parameter} and {your field} <= {?end parameter}
I haven't used CR 9, but in CR 10 you can get to the record selection formula by going to Report > Selection Formulas > Record.
James