Print Page | Close Window

Passing data from Subreport to Main report

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=19497
Printed Date: 04 Apr 2025 at 8:33pm


Topic: Passing data from Subreport to Main report
Posted By: BSquare
Subject: Passing data from Subreport to Main report
Date Posted: 03 May 2013 at 11:12am
I am still fairly new to subreports so thanks for bearing with me.
I am creating a list of patients that were seen by our mental health clinic but they don't want to see any patients who have ever had any visits to our medical clinic. Due to the range of parameters that was requested on my main report, I thought that a sub report would be the best way to get a list of all of the patients who have been seen by the medical clinic and then eliminate those patients from the main report.
 
Basically, how do I get my list of patients from my subreport to not show up in my main report?
 
Any advice would be greatly appreciated!
 
Thanks!
Kristin


-------------
Kristin
EHR Application Specialist



Replies:
Posted By: lockwelle
Date Posted: 06 May 2013 at 4:47am
the only thought that comes to mind is put them in an array in the subreport, and then using shared variables, 'pass' the array to the main report. The main report, I think, could use an IN or you could loop through the array...either way, it should work.

arrays are not the most friendly / useful in CR, they are just 1-D, and I don't use them much, so I don't know the syntax off the top of my head, but you can look at CR Help. You would probably want to dimension the array to relatively large value or use REDIM PRESERVE to allow it to grow.

Hope this leads to a solution.


Posted By: BSquare
Date Posted: 06 May 2013 at 12:29pm
That's what I was afraid I might have to do after a weekend of thought. Arg. Thank you for your response, I really appreciate it! :)

-------------
Kristin
EHR Application Specialist


Posted By: guptaa
Date Posted: 23 May 2013 at 3:48pm
still looking for help...?
Please provide the sample data set.

You could write suppress condition while records print...if data allows.


-------------
Aradhana



Print Page | Close Window