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

Pass Parameter directly to SubReport from VB

Status
Not open for further replies.

mdecap

Programmer
Jul 20, 2007
7
US
I have an old legacy VB 6 application that uses Crystal Reports 9.

One Report I have is acting quite strange passing parameters to the main report and then via Sub Report Links to a subreport.

I was wondering, is there a way in the VB code to pass a parameter directly to the subreport?

I currently use the following format to pass paramteters to the main report: MainReportExternal.ParameterFields.GetItemByName("@FILTERTYPE").AddCurrentValue strFilterType

Could there be a nice way of using something along the lines of "MainReportExternal.subreports(0).parameterfields..." to pass directly to the subreport via the main report?
 
Not sure you would want to do that. The sub report is an object within the main Crystal Report.

Crystal has a perfectly good means of passing data from main to subreport so why would you want to do something different.

As the adage says "if it aint broke don't fix it!"

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top