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!

Not returning data in main report from a sub-report

Status
Not open for further replies.

Sahubba

Programmer
Mar 16, 2011
108
US
Hello,

I am having issues with a sub-report.

My main report looks like this:

GH#1a: Group#1 Name (Visit Provider)
GH#1b:(Name)(MRN)(ApptTime)(CompletedAppt)(Canceled)(NoShow)(LWOBS) (Those are just field headers)
GH#2: (Supress)
Details:{Name}{MRN}{Apptime}{CompletedAppt}{Canceled}{NoShow}{LWOBS}
GF#2B: Group#2 Name (PRC Name) DistinctCount{Patient}
GF#1B: {Subreport}

The subreport is just a distinct count of the patients that are rescheduled:
everything is suppress but:
GF#1: DistinctCount{Patient}
it is grouped by Visit Provider.

I have the subreport linked
{PAT_RESCHED.VISIT_PROV_ID} = {?Pm-PAT.VISIT_PROV_ID}
and
{PAT_RESCHED.PATIENT} = {?Pm-PAT.PATIENT}

When I run just the subreport I get the correct count.
But when i run it with in the main report I get nothing.


Can someone please help me?
Thanks
 
Place these fields alongside subreport in GF1 and make sure they are returning the values you expect.

{PAT_RESCHED.VISIT_PROV_ID} and {PAT_RESCHED.PATIENT}

I suspect that as its linked on Patient SR should be in GF2

Ian
 
Hi Ian,

In those fields {PAT_RESCHED.VISIT_PROV_ID} and {PAT_RESCHED.PATIENT} Do not exist with in the Main Report.

But if you are asking if those fields work in the subreport then yes they do.

In the GF2 the distinct count of patient is counting how many patient with in the PRC group.



I hope I understood you.

Thanks,
Sara
 
Sorry my Bad I did of course mean

PAT.VISIT_PROV_ID and PAT.PATIENT which are the main report fields

If you are doing a count of patients by VISIT_PROV_ID then you should not join subreport by patient key, otherwise count will always be one for the last patient in the Main report PAT.VISIT_PROV_ID

Ian
 
Thats great!!!!!
I got it to work!!!!!

Thank you so much for your help.... :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top