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

Information in subreport based on main report 1

Status
Not open for further replies.

crachic

Technical User
Dec 27, 2007
46
US
I am trying to populate data in a subreport based on the output in the main report. Below is a generic example of what I am trying to accomplish. A subreport may not even be the way to do this but that was my initial thought.

Main report
Group 1 - Location
Group 2 - Room
Group 3 - Bed

I have in Group 3 a list of patients that are assigned a bed. Each bed correlates to a room at a location (Hierarchy is Locatoin/Room/Bed). When a patient is assigned a bed, they are also linked to a program. For Example:

Bed Patient Name Program
A John Doe 100
B Jane Doe 101
C Carl Doe 100

That report is working great. Now in my subreport I want it to give me a total of the number of patients that are associated to a program. For example:

Subreport expected outcome:

Program Total number of patient
100 2
101 1

This needs to populate for each Location which right now I have it populating in Group Footer 1.

There are many more programs that are setup in the database but I ONLY want to show and print the totals for the programs that appear in my main report and DO NOT show any information for the programs that are not listed in the main report.

I am using Crystal XI. Any help would be greatly apprecaited.

-crachic
 
Insert a crosstab in the Location group header or group footer where you add program as the row field and distinctcount of patient as your summary field.

-LB
 
I did what you recommended and so far it has worked great. I now have to add a column that totals the programs by payer. The payer table has many payers in it but all I want to show is 3 payers. Payer 1, Payer 2, and Payer # which will be all other payers. I was playing around with things but cannot figure it out.

Any ideas.

Thanks in advance.

-crachic
 
Please disregard my previous post. I just figured it out.

Thanks for your help lbass

-crachic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top