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!

Passing 2 date parameters from main report into subreport

Status
Not open for further replies.

LizSara

Technical User
Oct 1, 2007
1,503
GB
I have a report with 2 date parameters (date from and date to) running as a 'between' option for a single field.

I need the dates given in the parameter to pass through to a subreport to pull through different information for the same dates.

I know i've done it before but i can't remember how :eek:

"Whoever battles with monsters had better see that it does not turn him into a monster. And if you gaze long into an abyss, the abyss will gaze back into you. ~ Nietzsche
 
Go to edit->subreport links and add the two parameters as links to the subreport. Then go into the subreport->report->selection formula->record and set the datefield to >= the start parameter and set the datefield to <= end parameter (or < end parameter + 1).

-LB
 
Thanks for the advice. I've done it on a shared date variable with an evaluate after statement because the way you suggested was trying to evaluate it too early and crashing out.

"Whoever battles with monsters had better see that it does not turn him into a monster. And if you gaze long into an abyss, the abyss will gaze back into you. ~ Nietzsche
 
Adding the date parameters as links is the standard approach and should not be a problem. In what sense would it be evaluating too early? How did you implement this with a shared variable?

-LB
 
the variables in the main report are

EvaluateAfter ({?Appeal Date To});

Shared dateVar _fromDate := {?Appeal Date From};

and

EvaluateAfter ({?Appeal Date To});

Shared dateVar _toDate := {?Appeal Date To};

and these are pciked up in the subreport as {APPEALS.APPL_DATE} in {?Pm-@f_fromdate} to {?Pm-@f_todate}

I don't know why it was doing it but when i tried to use the parameter fields to link to the sub report it wasn;t letting me.

"Whoever battles with monsters had better see that it does not turn him into a monster. And if you gaze long into an abyss, the abyss will gaze back into you. ~ Nietzsche
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top