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!

Subreport - filter value based on

Status
Not open for further replies.

BettyJ

Programmer
Jul 25, 2012
269
US
I am using subreports for the first time. I need some help.

I have a main report that has a column (Latest Office Visit Date)which is a formula field calculated based on two date parameters.
DateFrom
DateTo
It gives the Latest Office Visit the patient had between the dates supplied.

I have another report (to be used as subreport) which calculates the observation values (eg BP, Weight,etc) of the patient. It should be the value that is obtained before the Latest office visit date calculated in the first report. I want to use that calculated date to be the parameter to filter the result in the second report. How can this be done.

Thanks in advance for any help
 
Define a parameter in the subreport for the office visit date. Ensure the datatype of the formula results and the sub report parameter are the same. Change the links of the subreport, right click on the subreport as seen in the design of the main report, and link the formula from the main to the parameters of the subreport.
 
Maybe you need to make the observation values subreport into the main report. Or you could put it at the start and pass back the values using Shared Variables. (Do SEARCH if you need examples of these.)

Crystal does not allow subreports within subreports, unfortunatley.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top