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 date parameter to sub report

Status
Not open for further replies.

teachmecr

Programmer
Oct 1, 2006
72
US
Hi there
i'm trying to pass date parameters from main report to a sub report. The date parameters in the main report gets a value at prompt and then they are compared with the submission date field in the view and the results are returned accordingly. what i have is a from date and to date. For example if i enter Aug 1 2007 and Aug 31 2007..the report would be generated for that period..works fine for the main report but how do i link that to the sub report.. any help would be appreciated. thanks
 
The easiest way is to copy the parameters from the main report to sub report. Use them as you require in the sub report.

In th link subreport dialog box select the parameter from the main report into the top right pane.

In bottom left select same parameter name from drop down list.

repeat for parameter 2

Ian
 
This is what i have in my main report.

{VendorStatusFinPgmVW.name} = {?Finance Program} and
{VendorStatusFinPgmVW.submission_date} in {?from submission date} to {?to submission date}

The problem is i that submission and to date parameters have nothing assigned to them and they arent any field from the view either so it gives me error when i use them in the sub report as u suggested..it says field name is not known...so im not sure whats the way around it. thanks
 
Sorry when I said copy, place both parameters onto design area of main report, right click and copy. Open subreport design window and paste.

You can then delete from design, but they will still show in Subreport field explorer.

YOu can now use the subreport parameters as required

eg
{subreport date field} in {?from submission date} to {?to submission date}

Ian
 
Don't forget to link the parameters as I mentioned in my first post.

Ian
 
Thanks for ur quick response...and ur help..apprecited..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top