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.




LVL 1
rreimundAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rreimundAuthor Commented:
BTW, I need to do this for three different Party types - which is why I thought doing it in the Details sections wouldn't work well.

Statement Recipients: _---------------
Name
Address
Frequency

Authorized Signatures: ------------
Name
Address


Authorized Contacts: ------------
Name
Address

etc.
0
mlmccCommented:
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
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rreimundAuthor Commented:
I've been side tracked on this issue, but I'm going to come back to it probably this week or next...
So I haven't been able to determine if this worked yet or not.
0
rreimundAuthor Commented:
Just wanted to close this out as I haven't yet gotten back to this task.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.