Solved

Crystal Reports--SubReport

Posted on 2016-08-11
3
47 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

[Webinar] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

Question has a verified solution.

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

Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

910 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now