Solved

Crystal Reports--SubReport

Posted on 2016-08-11
3
54 Views
Last Modified: 2016-08-12
Attempting to use Crystal to make a chain letter for our clinic.  Right now, I have a Group Header--that contains the bulk of the text, then various fields are sprinkled throughout that letter that pull each individual patient name.

The next step is where I'm tripping up--I would like to include all of their lab values from a table in the body of the letter, so I built a SubReport, that I would then interject into the Group Header at the proper location.

How do you pass each individual patient name into the subreport so that when the subreport runs in the group header--it pulls their specific lab values?  For example;


Dear {Person.FirstName}

Calling to write you about your lab results.  They were the following;

*SubReport*
{labvalues from within a date range passed through via the main report}



Dear {NextPerson.FirstName}

Thanks!
0
Comment
Question by:CMCITD
3 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 41752629
You can link the subreport to the main report.

Right click the subreport
CLick CHANGE SUBREPORT LINKS
Select the person's ID field (unique identifier for the person)
CLick the > to move it to the LINK ON box
Select the parameter the linking creates (?pm_FieldName)
CHoose to filter based on the field
Select the appropriate field in the subreport

mlmcc
0
 

Author Closing Comment

by:CMCITD
ID: 41752829
Terrific, thanks again mlmcc!
0
 
LVL 34

Expert Comment

by:James0628
ID: 41753576
FYI, you can also create parameters yourself in the subreport and use them in the record selection formula in the subreport, and then link fields/parameters from the main report to the subreport parameters that you created.  That's particularly useful if your tests are more complicated than just {?parameter} = {field}.

 James
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question