how to line up results into columns?
I'm attempting to output a query as an Excel-like table, where columns 1,2 are each a column in the query but columns 3 through an unknown number (about 30) are results from a single column of the query. I need each of the columns 4-30 to line up similar data, even if it means a blank cell. Any ideas on how to force this to happen? I've tried various schemes of grouping, looping, etc and nothing lines up the columns.
Example of output:
| col 1: person's name | col 2: person's place | col 3: car type | col 4: car type | col 5: car type | col 6: car type |
|---|---|---|---|---|---|
| name1 | place1 | volvo | lexus | bmw | |
| name2 | place2 | toyota | lexus | ||
| name3 | place3 | volvo | lexus | bmw | |
| name4 | place4 | toyota | bmw |
I want similar data values to line up visually. I can do groups to get col 1 and 2, but grouping for cols 3+ leaves out the blank cells, so that the values don't line up.
Any ideas anyone?