Are the sequence numbers in a list in one record or are they in a single column in multiple records?
If they're in multiple records, you'll have to use a variable to get the value to carry over from the previous records and you'll only be able to display the value after all of the details have been processed. So, assuming that you've grouped your data by authorization, you'll need two formulas that look something like this:
{@GetProcedureList}
WhilePrintingRecords;
StringVar codeList;
//reset the variable to an empty string at the start of each authorization
If OnFirstRecord or {Authorization.AuthorizationCode} <> previous({Authorization.AuthorizationCode}) then
codeList := '';
//add the current code to the list
codeList := codeList + {Authorization_ProcedureData.Code};
//add the comma to then end if we're not on the last record for this authorization
If not OnLastRecord or {Authorization.AuthorizationCode} = next({Authorization.AuthorizationCode}) then
codeList := codeList + ", ";
"";
Notice the use of ":=" to assign a value and ";" to end a line - these are required for multi-line formulas. Place this formula in the details section - it will calculate but not display anything.
{@ShowCodes}
WhilePrintingRecords;
StringVar codeList
Place this formula in the group footer to get the list of codes as a comma-delimited string.
-Dell
Edited by hilfy - 16 Apr 2018 at 1:01pm