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

Passing Multiple RANGE values to subreport 1

Status
Not open for further replies.

groasa

Technical User
Jun 14, 2001
39
US
Can this be done????

I have successfully passed parameters that are "Multiple" and "Discrete" to the subreport. But I have 3 more parameters that the customer can select multiple ranges.

I can get the values to pass to the subreport using the counts of the parameter and Maximum({?parameter}) and Minimum ({?parameter}) as a list of values. But I have no idea what to do after that.

Any help on this issue will be GREATLY appreciated!!!
 
I just passed a multple range from main to sub, and used it for selection criteria.

What do you want to do with the values in the sub?
What data type is the parameter?
What version of CR? Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
The original report was created in CR v7.0 for this customer. (If there's a solution that only works with or is different for v8.5, I can see if it would just be feasible for them to have a compiled report. Although, I think they like to stick w/ whatever version the client has at their location as much as possible.)

The multiple range parameter ({?ItemNumber}) I am using is a string data type to be used as selection criteria with the first default value as "ALL".

To pass to the sub I would use a formula like this:

If Count({?ItemNumber}) = 1 then
ToText(Minimum ({?ItemNumber}[1])) + ", " +
ToText(Maximum ({?ItemNumber}[1]))
Else If Count({?ItemNumber}) = 2 Then
ToText(Minimum ({?ItemNumber}[1])) + ", " +
ToText(Maximum ({?ItemNumber}[1])) + ", " +
ToText(Minimum ({?ItemNumber}[2])) + ", " +
ToText(Maximum ({?ItemNumber}[2]))
etc....

For the selection formula in the subreport, I would normally put something like this (for multiple, discrete):

(If {?Pm-@LinkItemNumber} = "ALL" Then True
Else {ItemFile.ItemNumber} in {?Pm-@LinkItemNumber})

But then it will only print the numbers that were passed not the ranges.

What am I missing here?

Oh, BTW, this has nothing to do with my question at hand, but I enjoyed seeing the links you have listed under "Interesting Propaganda" on your web site.
 
You can't pass multiple parameters to subreports in V7. You can in V8 and V8.5.
Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Thanks, Ken.

That was the answer I was looking for. I figured if the workaround that Crystal gives for v7.0 is this involved for multiple discrete values, then it had to be worse or just not possible for multiple ranges.

Though I haven't heard back from the client, I updated the report in v8.5 just in case they want it.

Thanks again!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top