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

Sharing Main Report Parameter Input with Subreport

Status
Not open for further replies.

oj75

MIS
Aug 7, 2002
53
US
I am selecting records on the main report based on 3 parameters. A number and two date parameters. I want to link a subreport to the main report based on a foreign key field in the main report. However, I want to select the records in the subreport based on the two date parameters stored in the main report. How can I do this? Do I have to use shared variables and store the main report parameter values in variables that are then passed to the subreport and stored in a formula fields? Is there an easier way to do this? Any information is appreciated.

oj
 
You would also link the subreport parameters to the corresponding main report parameters. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
I've tried passing the parameter values via shared variables which I been able to do successfully. But I can not select records in the subreport based on a formula field. I also can not seem to link parameter fields from a main report to a subreport unless they are field in the main report and not date parameters that I created independently. Any words of wisdow?

Thanks,
OJ.
 
You can't select on shared variables. But, you should be able to link a subreport parameter to a main report parameter. They have to be the same exact data type.

What version of CR?
Are the parameters set to use Dates or DateTimes? Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Ken--
I mucked around in old posts within this forum and found a helpful seed of wisdom. I didn't realize that when linking parameter fields between main and subreports that you had to use the microscopic little scrollbar to find the parameter field name without the Pm prefix. All my problems were due to the poor placement of this scrollbar.
 
That is exactly why I asked for your version.
This is a v8.5 "feature". Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top