Iterating over records - Crystal Reports 2008
I need to know how to iterate over records in CR2008, and when it reaches a record that is not NULL, write that in a variable.
I have a "frmAccum" formula that I pick up in the details section and suppress. I use this to collect information for each post processed. I also have a formula called frmReset where I store the stringvar "person_name" to "" and I can drop that in the group header before reset after the grouping.
When it comes to a person_name field that is not NULL and is not empty, I want it to store the name in a variable that will be used in the title of the report.
So something like this:
stringvar person_name;
whileprintingrecords;
If ({Command.personname} <> "") Then
person_name := {Command.personname}
I can't seem to get this combination to work. Any help is appreciated.
Well I got no response and figured out how to change my command to put the name in all fields in the column, so I can pull it out now using Command.personname.
If anyone comes back to read this and knows how to do it using Crystal syntax, that would be greatly appreciated.
whileprintingrecords;
stringvar person_name;
If Isnull({Command.personname}) Then
person_name := {Command.personname}