|
|
Question : How to display multiple rows from a record horizontally.
|
|
I've seen some of the responses about using the multi-column layout for the details section - but I'm not sure if it would apply here.
I have the data I need in a view. I've got an account which is what I'm grouping by, and then a party that is linked to that account. In the view, there is a separate row for each party: Account 1 Party 1 Account 1 Party 2 Account 2 Party 1 Account 2 Party 2 Account 2 Party 3 Account 2 Party 4 Account 3 Party 1 etc.
In the report, I need to display the list of parties as such:
Statement Recipients------------------------------------------ (header) Name First Party Name Second Party Name (if exists) Third Party Name (if exists) Address First Party Address Second Party Address (if exists) Third Party Address(if exists) Frequency First Statement Freq. Second Statement Freq(if exists) Third Statement Freq
I figured I would put the "First Party Name" as a formula field.
I then made this formula: if len({vAccountInfo.FIRST_NAME}) > 0 AND len({vAccountInfo.LAST_NAME}) > 0 then {vAccountInfo.FIRST_NAME}+' '+{vAccountInfo.LAST_NAME}
I would then end up with three formula fields called First Party Name, Second Party Name, and Third Party Name respectively and put them in the section in the appropriate place. My question is what would I add to the formula above to identify the 1st, 2nd, or 3rd record of that particular Account Number? I thought of using RecordNumber = 1, 2, or 3 but I think that is more for the first record of the whole view - not within that grouped Account Number.
|
Answer : How to display multiple rows from a record horizontally.
|
|
You could use a formula to count the records in the group.
IN the report header Name - DeclVars WhilePrintingRecords; Global NumberVar MyRecordCount := 0; ' '
IN the group header Name - ResetCount
WhilePrintingRecords; Global NumberVar MyRecordCount; MyRecordCount := 0; ' '
In the detail section Name - DispCOunt
WhilePrintingRecords; Global NumberVar MyRecordCount; MyRecordCount := MyRecordCount + 1;
If MyRecordCount = 1 then 'First' Else if MyRecordCount = 2 then 'Second' etc
mlmcc
|
|
|
|
|