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

Restrict a sub report by a variable in the main report 1

Status
Not open for further replies.

MikeRussell

Programmer
Apr 22, 2001
16
0
0
AU
I have a variable in my main report @enddate, which stores a date value, this is currently in the Page Header. My main report is based on many tables, but the main one is STMTRPT.

The main report/sub report link is STMTRPT.DEAL_NO -> CFLOWS.DEAL_NO

My sub report is based only on the CFLOWS table. I want to restrict it to only show records whereand CFLOWS.CFLOW_DT > = @enddate.

How do I do it? Any help would be great. I am going home now (I live in Australia) hopefully there will be an answer for me in the morning.

Cheers
Mike.
 
You need to put the subreport in its own section, and then apply a suppression formula to that section. In Crystal 8.5, right-click for [Format Section]. Put your test in the formula.


Madawc Williams
East Anglia, Great Britain
 
I think you may be better served by adding another link to your subreport. Create an {?End_Date} parameter in the subreport and link the @enddate formula in the main report with the {?End_Date} parameter in the subreport. Then insert CFLOWS.CFLOW_DT > = {?End_Date} into the Selection criteria for the subreport.
 
Thanks guys,

Madawc, I should have said that after restricting the records on the sub report, I then only wanted to display a summary field, so this solution probably wouldn't work. cheers.

GMcNamara. Thanks this solution works a treat. cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top