I'd like to print out one vendorname for several call numbers
and amont paids instead of displaying duplicate vendoranme each
line. When i run the code below, the table format came out wrong. I
did print vendor name once, but next line of the call number should
be positioned under the call number header, but it goes under the
vendor name again.
anyoen can help me to correct this data display?
Expected output:
VENDOR NAME | CALL# | AMT PAID
--------------------------------------------------------------------------------------
VERIZON WIRELES | CALLNO01 | $500.00
----------------------------------------------------------------------------------------
empty space |CALLNO02 | $200 |
-------------------------------------------------------------------------------------
empty space |CALLNO03 | $50 |
------------------------------------------------------------------------------------
empty space |CALLNO04 | $10 |
------------------------------------------------------------------------------------
--------- wrong output result for code below --------------
------------------------------------------------------------------------------------------
VENDOR NAME | CALL# | AMT PAID
--------------------------------------------------------------------------------------
VERIZON WIRELES | CALLNO01 | $500.00
----------------------------------------------------------------------------------------
CALLNO02 | $200 |
-------------------------------------------------------------------------------------
CALLNO03 | $50 |
------------------------------------------------------------------------------------
CALLNO04 | $10 |
------------------------------------------------------------------------------------
For what you are trying to do, I think you have to replace
the group attribute with some if/else logic. If it's a new vendor,
display it, otherwise display an empty table cell. There might be a
more elegant way, but I can't think what that would be.
Dan, sounds great. I will try. thanks.
CJ, it displays good, but the first row also should display
call number next to the vendor name. thanks for your help.
The output for your code displays as below: (The second row
should go to the same line of the vendor name)
VENDOR NAME | CALL# | AMT PAID
--------------------------------------------------------------------------------------
VERIZON WIRELES | empty space
----------------------------------------------------------------------------------------
empty space | CALLNO01 | $500.00
----------------------------------------------------------------------------------------
empty space |CALLNO02 | $200 |
-------------------------------------------------------------------------------------
empty space |CALLNO03 | $50 |
------------------------------------------------------------------------------------
empty space |CALLNO04 | $10 |
------------------------------------------------------------------------------------
Expected output:
VENDOR NAME | CALL# | AMT PAID
--------------------------------------------------------------------------------------
VERIZON WIRELES | CALLNO01 | $500.00
----------------------------------------------------------------------------------------
empty space |CALLNO02 | $200 |
-------------------------------------------------------------------------------------
empty space |CALLNO03 | $50 |
------------------------------------------------------------------------------------
empty space |CALLNO04 | $10 |
------------------------------------------------------------------------------------