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

Shared Variable Problem

Status
Not open for further replies.

AyJayEL

Technical User
Jan 30, 2001
425
GB
I have a report with sub report of a child's school history. When it is run the users puts in the date they want it to run for. i.e. 31/3.2001. I want it to show which school they were attending on that day. How do I pass the date parameter to the subreport. The subreport is linked by the student id.

I have created a formula that looks like this.

whileprintingrecords;
shared datevar tellme;
tellme ={?Date};
tellme

The report is grouped by Student Id and I have put the formula in the top of the group to make sure it is working but it displays blank. Can you tell me what I have done wrong.

In the subreport I want to use it like this.

schoolStartDate > tellme and schoolEndDate is < tellme or isnull(schoolEndDate)

Does that sound about right?

Learn something new every day *:->*
AyJayEl
 
Just to let you know that I'm an idiot! Missed out the :

Should have been tellme:={?date}

It's displaying now. Hopefully I can get it to pass to the subreport. Fingers crossed. [yawn]


Learn something new every day *:->*
AyJayEl
 
Have you tried joining the subreport on the date field along with the Student Id then the subreports record selection should look something like this:

student_ID = {?PM_studID} and
startedate >= {?PM_date} and
enddate <= {?PM_date}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top