I think synapsevampire meant that Global is optional in the declaration line. If you don't specify the scope, Global is assumed.
Shared is only required when passing between a report and a subreport.
The "WhilePrintingRecords" that was provided by sv is what will give you the result you want.
thanks, got it - didn't have the Whileprintingrecords.
I was just trying to understand why my variable value was not passing between functions.
What I am really trying to do is this:
Have a simple file of patient names, status and date, like
Joe, 1/1/2003,active
Joe, 2/1/2003,hold
Joe, 3/1/2003,active
Susan,1/1/2003,hold
Given a date (say 2/10/2003), list and count the patients who were active. I need to create a group with the patient info (and I relate back to the patient file) include only the patients who are active at that time by looking at the status value in the record immediately before the paramater date entered when the report was run.
Crystal reports 10
In the above example, if you ran for 2/10/2003 you would get no records, if you ran for 1/10/2003 you would get Joe's record.
It's basic but I'm building on this, relearning variables / formulas after not working with them for awhile. Any direction is appreciated. The Whileprintingrecords solved the first problem.
In the select formula, select all records less that your parameter date. Group by patient id. Sort by date. Suppress the detail section. In group footer for patient print the info. Suppress the patient group footer if status <> "active". I'm not sure how your count of nrecords fits into all of this.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.