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

Sub Reports - Selection Formula

Status
Not open for further replies.

yagnik3128

Programmer
Jun 14, 2001
64
IN
If i want to pass the selectionformula for date range in sub report.

How is it possible. Cal anyone help me?

 
hi

create your parameter in the main report
?BeginDate and the other ?EndDate

do the same in the sub report
?subBeginDate and ?subEndDate

link them
cheers

pgtek
 
1. Create parameters for your start and en date in the main report i.e. ?StartDate and ?EndDate.

2. Go to Edit -> SubReport Links

3. select ?StartDate from the Available fields list and add that to the fields to link to

(crystal will automatically create a parameter in the subreport called ?Pm-?StartDate)

4. Select the Field from the subreport you want the dates based on.

5. Repeat steps 3 & 4 for the ?EndDate parameter and click OK

This will enter a selection formula in the subReport like

?StartDate={MyTable.fldDate} and ?EndDate={MyTable.fldDate}

you will need to manually edit this to change the comparison signs e.g.

?StartDate>={MyTable.fldDate} and ?EndDate<={MyTable.fldDate}

HTH

Gary Parker
Systems Support Analyst
Manchester, England
 
Hi pgtek,

I have done as per ur sugg. But now my problem is how to pass parameter value from vb?

Pl. Help me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top